Wrapper for LLM responses that normalizes output from different APIs.
| 43 | parsed_model: Optional[BaseModel] = Field(default=None, description="The parsed model of the content") |
| 44 | |
| 45 | class LLMResponse(BaseModel): |
| 46 | """ |
| 47 | Wrapper for LLM responses that normalizes output from different APIs. |
| 48 | """ |
| 49 | model_config = ConfigDict(arbitrary_types_allowed=True, extra="allow") |
| 50 | |
| 51 | success: bool = Field(description="Whether the model call was successful") |
| 52 | message: str = Field(description="The message from the model call") |
| 53 | extra: Optional[LLMExtra] = Field(default=None, description="The extra data from the model call") |
| 54 | |
| 55 | __all__ = ["ModelConfig", "LLMResponse", "LLMExtra"] |
| 56 |
no outgoing calls
no test coverage detected