Table of Contents
Module spoon_ai.schema
Function Objects​
class Function(BaseModel)
get_arguments_dict​
def get_arguments_dict() -> dict
Parse arguments string to dictionary.
Returns:
dict- Parsed arguments as dictionary
create​
@classmethod
def create(cls, name: str, arguments: Union[str, dict]) -> "Function"
Create Function with arguments as string or dict.
Arguments:
name- Function namearguments- Function arguments as string or dict
Returns:
Function- Function instance with arguments as JSON string
AgentState Objects​
class AgentState(str, Enum)
The state of the agent.
ToolChoice Objects​
class ToolChoice(str, Enum)
Tool choice options
Role Objects​
class Role(str, Enum)
Message role options
ROLE_TYPE​
type: ignore
Message Objects​
class Message(BaseModel)
Represents a chat message in the conversation
role​
type: ignore
SystemMessage Objects​
class SystemMessage(Message)
role​
type: ignore
TOOL_CHOICE_TYPE​
type: ignore
LLMConfig Objects​
class LLMConfig(BaseModel)
Configuration for LLM providers
LLMResponse Objects​
class LLMResponse(BaseModel)
Unified LLM response model
text​
Original text response
LLMResponseChunk Objects​
class LLMResponseChunk(BaseModel)
Enhanced LLM streaming response chunk.