-
Notifications
You must be signed in to change notification settings - Fork 350
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 OpenAI support in Marvin v2 #705
Comments
Using prerelease v2.0.1a1, got this same error with regular OpenAI (not Azure) and using this copied example from docs. : sentiment_list( |
@lostmygithubaccount do you get the same error if you set @sdeep27 - how have you set your api key? |
yes same error -- tested by just copying |
@lostmygithubaccount - ah so we look for dotenv stuff in (marvin) pad-2 :: src/open-source/marvin ‹main›
» cat ~/.marvin/.env | rg OPENAI
MARVIN_OPENAI_API_KEY=sk-xxx
MARVIN_OPENAI_ORGANIZATION=org-xxx also my bad, the way the pydantic settings work, I would prefix the env var with if you set |
I got a step farther by copying my
I'm assuming I need to set a separate deployment environment variable from the client instantiation? regardless of what's needed right now, would appreciate a clear setup guide for getting Azure OpenAI to work w/ v2! would love to upgrade, have been stuck on v1.3.0 |
@lostmygithubaccount that's a good callout, thanks - we'll get an azure setup guide added in soon as we can |
@zzstoatzz |
Here's the full code:
returns: |
@zzstoatzz thanks for the quick responses! it is working now. There is some confusion because the website docs seem to be using the v2 syntax with no mention that it is not the default version installed on pip. Then to compound, the website docs have us passing the openAI client with the key rather than mentioning setting the marvin env variable. |
@sdeep27 sorry yep that's on us, right now the docs are showing marvin 2.x which is confusing because only the pre-release is available on pip - full release coming soon. I've just updated the quickstart / settings docs in that PR to make it clearer - thanks for the callout! |
@zzstoatzz can you confirm Azure is supported right now in v2 and which environment variables need to be set? I'm not seeing much with "Azure" in the codebase and can't figure it out, but things seemed to have changed from v1 if I can get that working I'd be happy to help PR a setup guide for Azure OpenAI -- for now going to play around w/ v2 on a regular OpenAI account |
hi @lostmygithubaccount - forgive me I feel like we've chatted on different issues at this point about this, but do you think we can close this issue? i've been able to test against azure myself recently and I'm not having any troubles using these env vars |
yep! I'll open more specific issues with Azure as I run into them |
First check
Bug summary
this seems to be blocked on the error:
AttributeError: 'NoneType' object has no attribute 'get_secret_value'
I've tried a few times to use Marvin v2 with Azure OpenAI, following the most recent docs for each. repro below
Reproduction
Error
Versions
Additional context
No response
The text was updated successfully, but these errors were encountered: