This project is a chatbot framework designed to interact with users in a conversational manner. It leverages a large language model (LLM) to generate responses and handle tool calls dynamically.
- Dynamic System Prompt: The chatbot generates a system prompt based on the provided summary and detail.
- Conversation History: Maintains a history of messages exchanged between the user and the chatbot.
- Tool Call Handling: Supports tool calls and processes them dynamically during the conversation.
- LLM Integration: Uses the
openai/gpt-oss-120bmodel for generating responses.
-
system_prompt():- Constructs the system prompt using the chatbot's
summary,detail, andname.
- Constructs the system prompt using the chatbot's
-
chat(message: str, history: List[Dict]):- Handles the main chat functionality.
- Accepts a user message and a history of previous messages.
- Interacts with the LLM to generate responses.
- Processes tool calls if required.
- The
chatmethod initializes the conversation with a system prompt. - It appends the user's message and the conversation history.
- The LLM generates a response, which may include tool calls.
- Tool calls are handled dynamically, and the conversation continues until a final response is generated.
- Clone the repository:
git clone <repository-url> cd <repository-folder>