livellm 1.5.2__tar.gz → 1.5.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {livellm-1.5.2 → livellm-1.5.4}/PKG-INFO +1 -1
- {livellm-1.5.2 → livellm-1.5.4}/livellm/models/agent/agent.py +1 -1
- {livellm-1.5.2 → livellm-1.5.4}/livellm/models/agent/chat.py +3 -3
- {livellm-1.5.2 → livellm-1.5.4}/pyproject.toml +1 -1
- {livellm-1.5.2 → livellm-1.5.4}/.gitignore +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/LICENSE +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/README.md +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/__init__.py +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/livellm.py +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/models/__init__.py +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/models/agent/__init__.py +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/models/agent/tools.py +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/models/audio/__init__.py +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/models/audio/speak.py +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/models/audio/transcribe.py +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/models/common.py +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/models/fallback.py +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/models/transcription.py +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/models/ws.py +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/py.typed +0 -0
- {livellm-1.5.2 → livellm-1.5.4}/livellm/transcripton.py +0 -0
|
@@ -9,7 +9,7 @@ from ..common import BaseRequest
|
|
|
9
9
|
|
|
10
10
|
class AgentRequest(BaseRequest):
|
|
11
11
|
model: str = Field(..., description="The model to use")
|
|
12
|
-
messages: List[Union[TextMessage, BinaryMessage]] = Field(..., description="The messages to use")
|
|
12
|
+
messages: List[Union[TextMessage, BinaryMessage, ToolCallMessage, ToolReturnMessage]] = Field(..., description="The messages to use")
|
|
13
13
|
tools: List[Union[WebSearchInput, MCPStreamableServerInput]] = Field(default_factory=list, description="The tools to use")
|
|
14
14
|
gen_config: Optional[dict] = Field(default=None, description="The configuration for the generation")
|
|
15
15
|
include_history: bool = Field(default=False, description="Whether to include full conversation history in the response")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# models for chat messages
|
|
2
2
|
from pydantic import BaseModel, Field, model_validator, field_serializer
|
|
3
3
|
from enum import Enum
|
|
4
|
-
from typing import Optional, Union
|
|
4
|
+
from typing import Optional, Union, Any, Dict
|
|
5
5
|
|
|
6
6
|
class MessageRole(str, Enum):
|
|
7
7
|
USER = "user"
|
|
@@ -32,10 +32,10 @@ class BinaryMessage(Message):
|
|
|
32
32
|
class ToolCallMessage(Message):
|
|
33
33
|
"""Message representing a tool call made by the agent"""
|
|
34
34
|
tool_name: str = Field(..., description="The name of the tool being called")
|
|
35
|
-
args:
|
|
35
|
+
args: Union[Dict[str, Any], str] = Field(..., description="The arguments passed to the tool")
|
|
36
36
|
|
|
37
37
|
class ToolReturnMessage(Message):
|
|
38
38
|
"""Message representing the return value from a tool call"""
|
|
39
39
|
tool_name: str = Field(..., description="The name of the tool that was called")
|
|
40
|
-
content:
|
|
40
|
+
content: Any = Field(..., description="The return value from the tool")
|
|
41
41
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|