Creating your first assistant is straight forward. You start but configuring the Language Model (LLM) you want to use, then you create your agent and connect the language model to that agent.
Step by step guide
- Start by configuring a Language Model, in the example below we will configure
Note that you usually only need to create the
llm object once and re-use it for subsequent agents you create.
- Create an Assistant.
- Attach the LLM to the Assistant and invoke it.
By seperating the creation of each object you can reuse, LLMs, Agents or any other object such as Tools and Datasources multiple times without having to re-create them.
In just a couple of lines of code we have created a production ready chat Assistant using one of the GPT models. Checkout the other examples on how to add datasources and tools to your Assistants.
We've created a Replit template for this which you can run here.