Hello there,
I have an issue when trying to use the PDFSearchTool with Azure OpenAI.
Here is my code:
pdf_search_tool = PDFSearchTool(
config=dict(
llm=dict(
provider="azure_openai",
config=dict(
model=f"azure/{deployment_name}",
api_key=api_key,
base_url=azure_endpoint,
),
),
embedder=dict(
provider="azure_openai",
config=dict(
model="azure/xxx_embedding_model",
api_key = api_key,
api_base=azure_endpoint # HERE I tried multiple (s. below)
),
),
),
pdf='myPDFfile.pdf'
)
With the code above I get the following error:
BaseEmbedderConfig.init() got an unexpected keyword argument ‘base_url’
File
Alnternatively, I also used azure_endpoint with the error:
Key ‘config’ error:
Wrong key ‘azure_endpoint’ in {‘model’: ‘azure/xxx.openai.azure.com/’})
I also tried api_base with the error:
Value error, Must provide one of the base_url
or azure_endpoint
arguments, or the AZURE_OPENAI_ENDPOINT
environment variable [type=value_error, input_value={‘deployment’: None, 'htt…one, ‘model_kwargs’: {}}, input_type=dict]
My ChatModel seems to work but my embedding not… Can anyone help?