Initialize the client
client = openai.OpenAI()
file = client.files.create(file=open(“dlof.pdf”, “rb”),purpose=‘assistants’)
assistant = client.beta.assistants.create(
name=“Draft Letter Of Offer Assistant”,
instructions=“You are a merger and takeover specialist chatbot. Use your knowledge base to best respond to queries related to mergers and takeovers. Pls be precise”,
model=“gpt-3.5-turbo-1106”,
tools=[{“type”: “retrieval”}],
file_ids=[file.id]
)
What is the retrieval principle? Give pdf directly to AI? How to count tokens.
If it is a retrieval, it should only be a part of the gpt, that prompt is how, there is a way to output.