mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
docs: restructure LLM model configs API documentation for nested config object
Update API documentation to reflect new nested `config` object structure in LLM model configurations endpoints. The response format now encapsulates provider-specific fields (provider, base_url, model, temperature, api_key, max_tokens) within a `config` object, while moving ownership metadata (user_id, group_id, is_default, version, created_at, updated_at) to the top level. This aligns the user-facing endpoints with the group configuration structure and improves API consistency.
This commit is contained in:
1 parent
176b39145b
commit
f4723cd083
3 files changed
+80
-46
No files matched your search
@@ -99,25 +99,21 @@ class LLMModelConfigResponse(DateTimeModelMixin):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
|
||||
class LLMModelConfigWithSource(BaseModel):
|
||||
class LLMModelConfigWithSource(DateTimeModelMixin):
|
||||
"""Model configuration with source information (for inheritance)."""
|
||||
|
||||
config_id: UUID
|
||||
name: str
|
||||
model_type: ModelType
|
||||
config: LLMModelConfigData
|
||||
user_id: Optional[UUID] = None
|
||||
group_id: Optional[UUID] = None
|
||||
is_default: bool
|
||||
version: int
|
||||
source: str = Field(..., description="Source: 'user' or 'group'")
|
||||
group_name: Optional[str] = Field(None, description="Group name if source is 'group'")
|
||||
is_default: bool
|
||||
# Config fields
|
||||
provider: str
|
||||
base_url: str
|
||||
model: str
|
||||
temperature: float
|
||||
api_key: Optional[str] = None
|
||||
max_tokens: Optional[int] = None
|
||||
|
||||
# Allow extra config fields
|
||||
model_config = ConfigDict(extra="allow")
|
||||
model_config = ConfigDict(from_attributes=True, extra="allow")
|
||||
|
||||
|
||||
class LLMModelConfigInheritedResponse(BaseModel):
|
||||
|
||||
Reference in new issue
Block a user