from pydantic import BaseModel from typing import Optional class ToolCreate(BaseModel): name: str description: str function_code: str # The Python code for the tool function class ToolOut(BaseModel): id: int name: str description: str class Config: orm_mode = True class QueryRequest(BaseModel): input: str class QueryResponse(BaseModel): output: str class AnswerResponse(BaseModel): id: int query: str answer: str timestamp: str class Config: orm_mode = True