Quickstart 🚀
Integrate Weavel in under 2 minutes and understand the user journey hidden in conversations between users and your AI.
Create a project
To begin, sign up and create a project.
Create an account
SDK integration
# Example FastAPI endpoint for your chatbot
from weavel import create_client
weavel_client = create_client()
@app.post("/chat")
async def chat(
messages: List[Dict[str, Any]],
user_uuid: str,
trace_uuid: str
):
"""Chat with GPT-3.5-Turbo"""
trace = await weavel_client.open_trace(user_id=user_uuid, trace_id=trace_uuid)
response = openai_client.chat.completions.create(
messages=messages,
model="gpt-3.5-turbo",
)
trace.log_message("user", messages[-1]["content"])
trace.log_message("assistant", response.choices[0].message.content)
return response.choices[0].message.content
Our SDK logs your conversational data without adding latency to your API.
Complete setup
Once you have integrated the SDK and the first data is logged, you can start exploring the generated insights in the Weavel dashboard.