Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Dict, List, Union, Optional
from datetime import datetime
from typing import List, Optional
from typing_extensions import Literal

from .._models import BaseModel
Expand Down Expand Up @@ -31,19 +30,9 @@ class Event(BaseModel):
class Metric(BaseModel):
metric: str

span_id: str

timestamp: datetime

trace_id: str

type: Literal["metric"]

unit: str

value: float

attributes: Optional[Dict[str, Union[str, float, bool, None]]] = None
unit: Optional[str] = None


class ChatCompletionResponseStreamChunk(BaseModel):
Expand Down
12 changes: 11 additions & 1 deletion src/llama_stack_client/types/completion_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
from .._models import BaseModel
from .token_log_probs import TokenLogProbs

__all__ = ["CompletionResponse"]
__all__ = ["CompletionResponse", "Metric"]


class Metric(BaseModel):
metric: str

value: float

unit: Optional[str] = None


class CompletionResponse(BaseModel):
Expand All @@ -18,3 +26,5 @@ class CompletionResponse(BaseModel):

logprobs: Optional[List[TokenLogProbs]] = None
"""Optional log probabilities for generated tokens"""

metrics: Optional[List[Metric]] = None
16 changes: 2 additions & 14 deletions src/llama_stack_client/types/shared/chat_completion_response.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Dict, List, Union, Optional
from datetime import datetime
from typing_extensions import Literal
from typing import List, Optional

from ..._models import BaseModel
from ..token_log_probs import TokenLogProbs
Expand All @@ -14,19 +12,9 @@
class Metric(BaseModel):
metric: str

span_id: str

timestamp: datetime

trace_id: str

type: Literal["metric"]

unit: str

value: float

attributes: Optional[Dict[str, Union[str, float, bool, None]]] = None
unit: Optional[str] = None


class ChatCompletionResponse(BaseModel):
Expand Down
4 changes: 0 additions & 4 deletions src/llama_stack_client/types/shared/tool_response_message.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Union
from typing_extensions import Literal

from ..._models import BaseModel
Expand All @@ -18,6 +17,3 @@ class ToolResponseMessage(BaseModel):

role: Literal["tool"]
"""Must be "tool" to identify this as a tool response"""

tool_name: Union[Literal["brave_search", "wolfram_alpha", "photogen", "code_interpreter"], str]
"""Name of the tool that was called"""
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

from typing import Union
from typing_extensions import Literal, Required, TypedDict

from .interleaved_content import InterleavedContent
Expand All @@ -19,6 +18,3 @@ class ToolResponseMessage(TypedDict, total=False):

role: Required[Literal["tool"]]
"""Must be "tool" to identify this as a tool response"""

tool_name: Required[Union[Literal["brave_search", "wolfram_alpha", "photogen", "code_interpreter"], str]]
"""Name of the tool that was called"""