improved prompt

pydantic_validation
Nicolas Nahas 6 months ago
parent 72ac0aab14
commit c0d0df5d24

@ -39,7 +39,13 @@ def symbol_must_exists(symbol= str) -> str:
# Initialize the schema for the person's information
class StockInfo(BaseModel):
"""
Describing a stock and it's infos
To create a StockInfo, you need to return a JSON object with the following format:
{
"function_call": "StockInfo",
"parameters": {
...
}
}
"""
name: str = Field(..., title="Name of the company")
description: str = Field(..., title="Description of the company")

@ -27,14 +27,17 @@ sys.path.insert(0, os.getcwd())
from pydantic import BaseModel, Field
from swarms import Agent, OpenAIChat
import agentops
agentops.start_session()
# Initialize the schema for the person's information
class PersonInfo(BaseModel):
"""
This is a pydantic model describing the format of a structured output
To create a PersonInfo, you need to return a JSON object with the following format:
{
"function_call": "PersonInfo",
"parameters": {
...
}
}
"""
name: str = Field(..., title="Name of the person")
agent: int = Field(..., title="Age of the person")

Loading…
Cancel
Save