Project Name: Create an chatbot application with OpenAPI

Update Project Delete Project

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 Steps

Step1:Get api key from openapi website

Update step Delete step

Step description:

create an OpenAPI account and get the api key

Step2:Get the template code from openapi documentation

Update step Delete step

Step description:

There is detailed sample code for api integration in openapi website, need to understand and integrate with my own application

Step3:Create django project to include that api integration

Update step Delete step

Step description:

Create a simple django front end and connect that with the api calling code as a view

Step4:Deploy into aws ec2 with nginx web server

Update step Delete step

Step 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 Issue
  • Issue 1-93298 upstream prematurely closed connection while reading response header from upstream, client:nginx drop the connection due to the socket file
    Update 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/742
      Update solution Delete solution