-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure Endpoint not working #90
Comments
It works for me on a mac.
|
yes, I'm using Windows. If you don't set the environment vars, it will say "you need to provide openai key" before getting this far. I tried with setting environment variables (get the above error), also tried hardcoding the variables in the code, and replacing os.getenv with just the names of the appropriate vars.... same error as above. |
Not to worry, got it working, there was a spelling error in the deployment ID. But when trying to run with docs:
It returns: File "G:\Code\memgpt\MemGPT\memgpt\agent.py", line 489, in step I'm assuming this is a windows limitation or something. |
Not sure if it's a Windows limitation. I can confirm that your command is working on my Mac.
|
Unfortunately that didn't work either.
|
To add to this, it's the exact same error just running in normal chat mode:
I have to add the no verify to get passed a different error:
|
There may be some bugs due to how Windows works as compared to Mac that result in this issue. |
Yeah, so I got my macbook out and it's working there. So this is clearly a windows related issue. I will say though, that even on a mac, creating embeddings doesn't work with azure
It seems this embeddings function is not checking for azure open ai usage, and it's trying to look for openAI key. Azure OpenAI models do support embeddings. https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/embeddings?tabs=console |
Should be fixed by #140 |
openai.error.InvalidRequestError: Must provide an 'engine' or 'deployment_id' parameter to create a <class 'openai.api_resources.chat_completion.ChatCompletion'>
It seems some of azure's required parameters are missing still.
Here is the error in full:
File "G:\Code\memgpt\MemGPT\main.py", line 336, in <module> app.run(run) File "G:\Code\memgpt\MemGPT\.venv\Lib\site-packages\absl\app.py", line 308, in run _run_main(main, args) File "G:\Code\memgpt\MemGPT\.venv\Lib\site-packages\absl\app.py", line 254, in _run_main sys.exit(main(argv)) ^^^^^^^^^^ File "G:\Code\memgpt\MemGPT\main.py", line 334, in run loop.run_until_complete(main()) File "C:\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "G:\Code\memgpt\MemGPT\main.py", line 312, in main new_messages, heartbeat_request, function_failed, token_warning = await memgpt_agent.step(user_message, first_message=False, skip_verify=FLAGS.no_verify) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\Code\memgpt\MemGPT\memgpt\agent.py", line 545, in step raise e File "G:\Code\memgpt\MemGPT\memgpt\agent.py", line 483, in step response = await get_ai_reply_async(model=self.model, message_sequence=input_message_sequence, functions=self.functions) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\Code\memgpt\MemGPT\memgpt\agent.py", line 115, in get_ai_reply_async raise e File "G:\Code\memgpt\MemGPT\memgpt\agent.py", line 96, in get_ai_reply_async response = await acreate( ^^^^^^^^^^^^^^ File "G:\Code\memgpt\MemGPT\memgpt\openai_tools.py", line 98, in wrapper raise e File "G:\Code\memgpt\MemGPT\memgpt\openai_tools.py", line 76, in wrapper return await func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\Code\memgpt\MemGPT\memgpt\openai_tools.py", line 108, in acompletions_with_backoff return await openai.ChatCompletion.acreate(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\Code\memgpt\MemGPT\.venv\Lib\site-packages\openai\api_resources\chat_completion.py", line 45, in acreate return await super().acreate(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\Code\memgpt\MemGPT\.venv\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 216, in acreate ) = cls.__prepare_create_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\Code\memgpt\MemGPT\.venv\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 85, in __prepare_create_request raise error.InvalidRequestError( openai.error.InvalidRequestError: Must provide an 'engine' or 'deployment_id' parameter to create a <class 'openai.api_resources.chat_completion.ChatCompletion'>
The text was updated successfully, but these errors were encountered: