Luodian / Otter

🦦 Otter, a multi-modal model based on OpenFlamingo (open-sourced version of DeepMind's Flamingo), trained on MIMIC-IT and showcasing improved instruction-following and in-context learning ability.
https://otter-ntu.github.io/
MIT License
3.55k stars 242 forks source link

Configure openai key in Syphus #183

Closed Byron1201 closed 1 year ago

Byron1201 commented 1 year ago

I want to use Syphus on your own dataset,but there was an error when requesting the API for openai, and I don't know how to choose OPENAI API BASE, OPENAI API VERSION and OPENAI_ API_ENGINE.When I use 'chatgpt0301' or other models as ENGINE, the value of ENGINE cannot be accessed. When I abandon engine and use gpt-3.5-turbo as the model, request failure will still be displayed. Can you provide some parameter examples? Thank you!

Luodian commented 1 year ago

Actually we use Azure OAI api to query ChatGPT. So the specific names and args may be "little" different. Let me figure out how to set it with OpenAI's official api.

Thanks for you patience~

Byron1201 commented 1 year ago

I have found a solution. Just delete the ENGINE and VERSION variable and set OPENAI API BASE="https://api.openai.com/v1/ ",and then modify code in function query_get as shown below.

            response = openai.ChatCompletion.create(
                model = "gpt-3.5-turbo",
                messages=messages,
            )
Byron1201 commented 1 year ago

Thank you for your letter. I just found out how to use OpenAI to solve this problem. The main problem is that two environment variables need to be deleted, otherwise strange bugs will continue to appear

------------------ 原始邮件 ------------------ 发件人: "Luodian/Otter" @.>; 发送时间: 2023年6月30日(星期五) 下午3:40 @.>; @.**@.>; 主题: Re: [Luodian/Otter] Configure openai key in Syphus (Issue #183)

Actually we use Azure OAI api to query ChatGPT. So the specific names and args may be "little" different. Let me figure out how to set it with OpenAI's official api.

Thanks for you patience~

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>