Skip to content

Forum in maintenance, we will back soon πŸ™‚

Streamlit user inte...
 
Notifications
Clear all

Streamlit user interface with openai API key Challenges

4 Posts
4 Users
1 Reactions
10 Views
(@dr-david-noye)
Posts: 1
New Member Customer
Topic starter
 

Hi Hasan, I am getting after I run a test on the streamlit interface. Kindly advise on how to resolve this issueΒ  Β  "APIRemovedInV1: You tried to access openai.Completion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API. You can run `openai migrate` to automatically upgrade your codebase to use the 1.0.0 interface. Alternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28` A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/74 2"

Β 

 
Posted : 12/11/2023 6:55 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@dr-david-noye you need to update your code library with the one provided here https://github.com/hassancs91/PE-Course-codes

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 12/12/2023 2:26 pm
(@husein)
Posts: 550
Member Moderator
 

@dr-david-noye The error message you're encountering indicates that the version of the OpenAI Python client you're using in your Streamlit application is no longer compatible with the current OpenAI API. So you need to use the new version. @hasan updated the codes you can check them in the link that @ssadvisor provided.

 
Posted : 12/12/2023 6:40 pm
Hasan Aboul Hasan
(@admin)
Posts: 1276
Member Admin
 

Hi @dr-david-noye, please update and use the latest code snippets I added on GitHub.

 
Posted : 12/12/2023 7:14 pm
Share:
[the_ad_group id="312"]