Closed ghost closed 4 months ago
I'm using this code and getting this error
code:
from dotenv import load_dotenv from lida import Manager, llm import os
load_dotenv()
text_gen = llm( provider="openai", api_type="azure", azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"], api_key=os.environ["AZURE_OPENAI_API_KEY"], api_version="2023-07-01-preview", ) lida = Manager(text_gen=text_gen)
print(lida)
Error:
Traceback (most recent call last): File "C:\FastAPI Projects\RAG.api\test.py", line 8, in text_gen = llm( ^^^^ File "C:\FastAPI Projects\RAG.api\venv\Lib\site-packages\llmx\generators\text\textgen.py", line 52, in llm return OpenAITextGenerator(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: OpenAITextGenerator.init() got an unexpected keyword argument 'azure_endpoint'
try updating library version.
pip install -U llmx lida openai
working now, these libraries aren't mentioned in the notebook where all the implementation is written down, thanks :)
I'm using this code and getting this error
code:
from dotenv import load_dotenv from lida import Manager, llm import os
load_dotenv()
text_gen = llm( provider="openai", api_type="azure", azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"], api_key=os.environ["AZURE_OPENAI_API_KEY"], api_version="2023-07-01-preview", ) lida = Manager(text_gen=text_gen)
print(lida)
Error:
Traceback (most recent call last): File "C:\FastAPI Projects\RAG.api\test.py", line 8, in
text_gen = llm(
^^^^
File "C:\FastAPI Projects\RAG.api\venv\Lib\site-packages\llmx\generators\text\textgen.py", line 52, in llm
return OpenAITextGenerator(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: OpenAITextGenerator.init() got an unexpected keyword argument 'azure_endpoint'