Skip to content
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

api_version in GUI not considered, need to set OPENAI_API_VERSION #807

Closed
OliverKleinBST opened this issue May 25, 2024 · 6 comments · Fixed by #1125
Closed

api_version in GUI not considered, need to set OPENAI_API_VERSION #807

OliverKleinBST opened this issue May 25, 2024 · 6 comments · Fixed by #1125
Labels
bug Something isn't working

Comments

@OliverKleinBST
Copy link

Description

I am using Azure as per below setting. The api_version I set in the GUI.
When I do so the code complains that I need to set the api_version as parameter or via OPENAI_API_VERSION. even though I have set it in the GUI. The problem disappears when I set environment variable.

Reproduce

{
"model_provider_id": "azure-chat-openai:gpt-35-turbo-16k",
"embeddings_provider_id": null,
"send_with_shift_enter": false,
"fields": {
"azure-chat-openai:gpt-35-turbo-16k": {
"api_version": "2023-07-01-preview",
"azure_endpoint": "https://bst-openai-instance.openai.azure.com"
}
},
...

jupyter_ai 2.16.0
langchain 0.1.20
langchain-community 0.0.38
langchain-core 0.1.52
langchain-openai 0.0.8
langchain-text-splitters 0.0.2
openai 1.30.3

@OliverKleinBST OliverKleinBST added the bug Something isn't working label May 25, 2024
Copy link

welcome bot commented May 25, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@albertmichaelj
Copy link

I am also running into this issue. Is there a known workaround?

@Yuto-24
Copy link

Yuto-24 commented Nov 5, 2024

I think this issues is already resolved somehow.
I can pass the api_version using UI.

$ python --version
Python 3.10.12

$ pip list | grep jupyter
jupyter                           1.1.1
jupyter_ai                        2.27.0
jupyter_ai_magics                 2.27.0
jupyter_client                    8.6.3
jupyter-console                   6.6.3
jupyter_core                      5.7.2
jupyter-events                    0.10.0
jupyter-lsp                       2.2.5
jupyter_server                    2.14.2
jupyter_server_terminals          0.5.3
jupyterlab                        4.2.5
jupyterlab_pygments               0.3.0
jupyterlab_server                 2.27.3
jupyterlab_widgets                3.0.13

$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

But, I'm facing other issue, can't pass Base API URL from UI.
So, I set AZURE_OPENAI_ENDPOINT insted for now.

I hope your issue is also resolved.

Thank you.

@dlqqq
Copy link
Member

dlqqq commented Nov 27, 2024

@OliverKleinBST @albertmichaelj @Yuto-24 Hey folks, sorry that this issue went undiscovered by our team for so long.

Good news though. Another contributor was able to provide steps to reproduce a similar bug in #1118. With that, I've been able to open a new PR to fix this: #1125

We're aiming to cut a patch release by early next week, after folks return from Thanksgiving.

I sincerely appreciate your patience. Thank you for using Jupyter AI!

@dlqqq
Copy link
Member

dlqqq commented Nov 27, 2024

Justification for closing this issue once #1125 is merged: the api_version parameter is still listed in AzureChatOpenAI, so the field key is correct. Therefore, this issue is almost certainly the same one documented in #1118, where model fields aren't updated until the server is restart, which is why you all were experiencing this issue.

@OliverKleinBST
Copy link
Author

Confirm that problem is gone with #1125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants