chatgpt
Wrapper for communicating with openAI's davinci 3 model
ChatGPT
Wraps the functionality for using the OpenAI api to get responses
Maintains a record of the conversation which is fed to the model.
Source code in backend/app/utils/chatbot/backends/chatgpt.py
answer_questions(statement, questions)
Answer a set of questions, it helps if they are numbered
Source code in backend/app/utils/chatbot/backends/chatgpt.py
classify(statement, classes, question='Should the prior statement be classified as')
Classify with an input question
Source code in backend/app/utils/chatbot/backends/chatgpt.py
get_bot_response(statement, speaker_id='Human', reset_conversation=False)
Calls the API with user input and conversation history to get bot response
Source code in backend/app/utils/chatbot/backends/chatgpt.py
query_API(prompt, stop=[' Human:', ' AI:'], temp=0.9, max_tokens=150)
Generate a response