from wetro import Wetrocloud
# Initialize the Wetrocloud client
client = Wetrocloud(api_key="your_api_key")
# Create a chat history
chat_history = [
{"role":"user", "content":"What is this document about?"},
{"role":"system","content":"This is the sales record of a company over the past 5 years"}
]
# Continue the conversation with context
chat_response = client.collection.chat(
collection_id="my_unique_collection_id",
message="Can you give me an idea of how my company is doing this Q1 compared to last year?",
chat_history=chat_history
)
print(chat_response)