You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an error while running the End-to-end example from the Azure OpenAI documentation. The error indicates that the OPENAI_API_KEY is not set .
Error Message:
Traceback (most recent call last):
File "C:\Applications\Application\autoLLM\demo.py", line 21, in <module>
world_model = WorldModel()
^^^^^^^^^^^^
File "C:\Applications\Application\autoLLM\venv\Lib\site-packages\lavague\core\world_model.py", line 377, in __init__
mm_llm = get_default_context().mm_llm
^^^^^^^^^^^^^^^^^^^^^
File "C:\Applications\Application\autoLLM\venv\Lib\site-packages\lavague\core\context.py", line 35, in get_default_context
return OpenaiContext()
^^^^^^^^^^^^^^^
File "C:\Applications\Application\autoLLM\venv\Lib\site-packages\lavague\contexts\openai\base.py", line 23, in __init__
raise ValueError("OPENAI_API_KEY is not set")
ValueError: OPENAI_API_KEY is not set
Steps to Reproduce:
Follow the End-to-end example from the Azure OpenAI documentation.
Fill in the required Azure configs
Run the provided code snippet.
Code Snippet:
fromlavague.coreimportWorldModel, ActionEnginefromlavague.core.agentsimportWebAgentfromlavague.drivers.seleniumimportSeleniumDriverfromlavague.contexts.openaiimportAzureOpenaiContext# Initialize context with our custom elementscontext=AzureOpenaiContext(
api_key="your_api_key",
deployment="deployment_name",
llm="<model_name>",
mm_llm="<model_name>",
endpoint="<your_endpoint>",
embedding="embedding_model_name",
embedding_deployment="embedding_deployment_name"
)
selenium_driver=SeleniumDriver()
# Build Action Engine and World Model from Contextaction_engine=ActionEngine.from_context(context=context, driver=selenium_driver)
world_model=WorldModel()
# Build agent & run queryagent=WebAgent(world_model, action_engine)
agent.get("https://huggingface.co/")
agent.run("What is this week's top Space of the week?")
Expected Behavior: The code should run without errors and perform the intended actions.
Actual Behavior: The code raises a ValueError indicating that the OPENAI_API_KEY is not set.
Passing the mm_llm from the context to the WorldModel when creating an instance of it fixes it.
world_model=WorldModel(mm_llm=context.mm_llm)
The text was updated successfully, but these errors were encountered:
I encountered an error while running the End-to-end example from the Azure OpenAI documentation. The error indicates that the
OPENAI_API_KEY
is not set .Error Message:
Steps to Reproduce:
Code Snippet:
Expected Behavior: The code should run without errors and perform the intended actions.
Actual Behavior: The code raises a
ValueError
indicating that theOPENAI_API_KEY
is not set.Passing the
mm_llm
from the context to theWorldModel
when creating an instance of it fixes it.The text was updated successfully, but these errors were encountered: