How to parse LLM response using pydantic?
I have a pydantic class that structures the LLM response I sent. But sometimes, it throws a validation error. How can I fix it?
Accessing of vaiable from inside of the flask instance to outside
from pydantic import BaseModel, Field from langchain.agents import initialize_agent, Tool, AgentType from langchain.tools import BaseTool, class GetIncidentsByUserInput(BaseModel): “””Input for Get Incidents by User.””” assigned_to: str = Field(…, description=”Name of the person assigned to the incident”) class GetIncidentsByUserTool(BaseTool): name = “get_incidents_by_user” description = “Useful for when you need to get all incidents assigned to a user. […]