forked from phoenix/litellm-mirror
types add GuardrailConfigBlock
This commit is contained in:
parent
31445ab20a
commit
3eaa1fa217
1 changed files with 16 additions and 7 deletions
|
@ -1,16 +1,18 @@
|
||||||
from typing import TypedDict, Any, Union, Optional, Literal, List
|
|
||||||
import json
|
import json
|
||||||
from .openai import ChatCompletionToolCallChunk
|
from typing import Any, List, Literal, Optional, TypedDict, Union
|
||||||
|
|
||||||
from typing_extensions import (
|
from typing_extensions import (
|
||||||
Self,
|
|
||||||
Protocol,
|
Protocol,
|
||||||
TypeGuard,
|
|
||||||
override,
|
|
||||||
get_origin,
|
|
||||||
runtime_checkable,
|
|
||||||
Required,
|
Required,
|
||||||
|
Self,
|
||||||
|
TypeGuard,
|
||||||
|
get_origin,
|
||||||
|
override,
|
||||||
|
runtime_checkable,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from .openai import ChatCompletionToolCallChunk
|
||||||
|
|
||||||
|
|
||||||
class SystemContentBlock(TypedDict):
|
class SystemContentBlock(TypedDict):
|
||||||
text: str
|
text: str
|
||||||
|
@ -108,6 +110,12 @@ class ToolConfigBlock(TypedDict, total=False):
|
||||||
toolChoice: Union[str, ToolChoiceValuesBlock]
|
toolChoice: Union[str, ToolChoiceValuesBlock]
|
||||||
|
|
||||||
|
|
||||||
|
class GuardrailConfigBlock(TypedDict, total=False):
|
||||||
|
guardrailIdentifier: str
|
||||||
|
guardrailVersion: str
|
||||||
|
trace: Literal["enabled", "disabled"]
|
||||||
|
|
||||||
|
|
||||||
class InferenceConfig(TypedDict, total=False):
|
class InferenceConfig(TypedDict, total=False):
|
||||||
maxTokens: int
|
maxTokens: int
|
||||||
stopSequences: List[str]
|
stopSequences: List[str]
|
||||||
|
@ -144,6 +152,7 @@ class RequestObject(TypedDict, total=False):
|
||||||
messages: Required[List[MessageBlock]]
|
messages: Required[List[MessageBlock]]
|
||||||
system: List[SystemContentBlock]
|
system: List[SystemContentBlock]
|
||||||
toolConfig: ToolConfigBlock
|
toolConfig: ToolConfigBlock
|
||||||
|
guardrailConfig: Optional[GuardrailConfigBlock]
|
||||||
|
|
||||||
|
|
||||||
class GenericStreamingChunk(TypedDict):
|
class GenericStreamingChunk(TypedDict):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue