I am trying to figure out how to pass extensive knowledge via an API to my python assistant, which works via API and then does other things with Python (writes to files, Excel, documents, on WordPress).
To create the chat completion response, I use:
This is python:
openai.api_key = openai_key # Ensure openai_key is defined securely
Create the chat completion response
response = openai.ChatCompletion.create(
model='xxxxxxxxxxxx',
temperature=1,
messages=[{"role": "system", "content": "You are an expert. Whatever user asks you, you reply by writing an article about it"},
{"role": "user", "content": mainprompt}],
)
Extract the text content from the response
content = response["choices"][0]["message"]["content"]
How can I provide it with very extensive knowledge?
(Let's assume that the knowledge base I provide to the assistants or GPT is a .txt file)
Thank you very much for your answers.