Project description
(https://mychatbot.oskarcode.com/) Project: -As openapi released API for GPT, I have create a simple chatbot application with the integration of openapi model API(https://platform.openai.com/docs/guides/text-generation/chat-completions-api). Language/Framework: -I used python request method to call the API and use Django to create the front-end( specifically read here, https://www.linkedin.com/posts/cloudflareoskar_oskars-chatbot-activity-7097684550188744704-XV5I?utm_source=share&utm_medium=member_desktop) Hosting: -I hosted it on AWS ec2
Project steps
Add StepsStep description:
There is detailed sample code for api integration in openapi website, need to understand and integrate with my own application
Issues and solutions
Add IssueStep description:
Create a simple django front end and connect that with the api calling code as a view
Issues and solutions
Add IssueStep description:
Once I finished up the Django front end with the API integration, I will deploy them into my aws server with nginx
Issues and solutions
Add IssueIssue 1-93298 upstream prematurely closed connection while reading response header from upstream, client:nginx drop the connection due to the socket fileUpdate Issue Delete Issue Add Solution
Solution 1-it is because the openai change their API for the v1 version:we need to either: - define the version of openai by pip install openai==0.28 -migrate to the new version of openait and rewrite the api functtion https://github.com/openai/openai-python/discussions/742Update solution Delete solution