Request Models
src.api.request_models.ChatCompletionRequest
Bases: BaseModel
Request model for chat completion endpoints.
Attributes:
Name | Type | Description |
---|---|---|
model |
Optional[str]
|
ID of the model to use for completion. |
messages |
List[dict]
|
Array of message objects with role and content. |
context |
Optional[ContextModel]
|
Additional context for API tools. |
Source code in src/api/request_models.py
37 38 39 40 41 42 43 44 45 46 47 |
|
src.api.request_models.ContextValue
Bases: BaseModel
Represents a key-value pair for contextual information.
This model is used to store individual pieces of context data that can be passed to tools or used in conversation.
Attributes:
Name | Type | Description |
---|---|---|
key |
str
|
The identifier for this piece of context |
value |
str
|
The actual context value |
Source code in src/api/request_models.py
8 9 10 11 12 13 14 15 16 17 18 19 |
|
src.api.request_models.ContextModel
Bases: BaseModel
Container for multiple context values.
This model serves as a collection of context values that can be passed around the system to provide additional information to tools and conversations.
Attributes:
Name | Type | Description |
---|---|---|
values |
List[ContextValue]
|
List of context key-value pairs |
Note: This model is used to define a structure for exposing in the API for allowing additional context to be passed through the system. The keys and values are used to create a dictionary which is passed to the streaming agent and anything downstream.
Source code in src/api/request_models.py
22 23 24 25 26 27 28 29 30 31 32 33 34 |
|