mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-04 02:03:44 +00:00
chore: remove used classes
These were maybe be included in the webmethod? The unit test was pointless too since the request was never used anywhere? Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
392e01dc79
commit
9878712465
3 changed files with 0 additions and 37 deletions
|
|
@ -6,26 +6,22 @@
|
||||||
|
|
||||||
from .conversations import (
|
from .conversations import (
|
||||||
Conversation,
|
Conversation,
|
||||||
ConversationCreateRequest,
|
|
||||||
ConversationDeletedResource,
|
ConversationDeletedResource,
|
||||||
ConversationItem,
|
ConversationItem,
|
||||||
ConversationItemCreateRequest,
|
ConversationItemCreateRequest,
|
||||||
ConversationItemDeletedResource,
|
ConversationItemDeletedResource,
|
||||||
ConversationItemList,
|
ConversationItemList,
|
||||||
Conversations,
|
Conversations,
|
||||||
ConversationUpdateRequest,
|
|
||||||
Metadata,
|
Metadata,
|
||||||
)
|
)
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"Conversation",
|
"Conversation",
|
||||||
"ConversationCreateRequest",
|
|
||||||
"ConversationDeletedResource",
|
"ConversationDeletedResource",
|
||||||
"ConversationItem",
|
"ConversationItem",
|
||||||
"ConversationItemCreateRequest",
|
"ConversationItemCreateRequest",
|
||||||
"ConversationItemDeletedResource",
|
"ConversationItemDeletedResource",
|
||||||
"ConversationItemList",
|
"ConversationItemList",
|
||||||
"Conversations",
|
"Conversations",
|
||||||
"ConversationUpdateRequest",
|
|
||||||
"Metadata",
|
"Metadata",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -102,32 +102,6 @@ register_schema(ConversationItem, name="ConversationItem")
|
||||||
# ]
|
# ]
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
|
||||||
class ConversationCreateRequest(BaseModel):
|
|
||||||
"""Request body for creating a conversation."""
|
|
||||||
|
|
||||||
items: list[ConversationItem] | None = Field(
|
|
||||||
default=[],
|
|
||||||
description="Initial items to include in the conversation context. You may add up to 20 items at a time.",
|
|
||||||
max_length=20,
|
|
||||||
)
|
|
||||||
metadata: Metadata | None = Field(
|
|
||||||
default={},
|
|
||||||
description="Set of 16 key-value pairs that can be attached to an object. Useful for storing additional information",
|
|
||||||
max_length=16,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
|
||||||
class ConversationUpdateRequest(BaseModel):
|
|
||||||
"""Request body for updating a conversation."""
|
|
||||||
|
|
||||||
metadata: Metadata = Field(
|
|
||||||
...,
|
|
||||||
description="Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
@json_schema_type
|
||||||
class ConversationDeletedResource(BaseModel):
|
class ConversationDeletedResource(BaseModel):
|
||||||
"""Response for deleted conversation."""
|
"""Response for deleted conversation."""
|
||||||
|
|
|
||||||
|
|
@ -7,18 +7,11 @@
|
||||||
|
|
||||||
from llama_stack.apis.conversations.conversations import (
|
from llama_stack.apis.conversations.conversations import (
|
||||||
Conversation,
|
Conversation,
|
||||||
ConversationCreateRequest,
|
|
||||||
ConversationItem,
|
ConversationItem,
|
||||||
ConversationItemList,
|
ConversationItemList,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_conversation_create_request_defaults():
|
|
||||||
request = ConversationCreateRequest()
|
|
||||||
assert request.items == []
|
|
||||||
assert request.metadata == {}
|
|
||||||
|
|
||||||
|
|
||||||
def test_conversation_model_defaults():
|
def test_conversation_model_defaults():
|
||||||
conversation = Conversation(
|
conversation = Conversation(
|
||||||
id="conv_123456789",
|
id="conv_123456789",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue