Pydantic DTOs for listing chat model configurations in agentscope.
# Source: https://github.com/agentscope-ai/agentscope | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
# -*- coding: utf-8 -*-
"""The chat model configuration, used as DTO layer."""
from pydantic import BaseModel, Field
from ....model import ModelCard
class ListModelsResponse(BaseModel):
"""List the candidate models response."""
models: list[ModelCard] = Field(description="The candidate models.")
total: int = Field(description="The total number of candidates.")
class ListModelsRequest(BaseModel):
"""List the candidate models request."""
provider: str = Field(
description="The provider type, e.g. openai, dashscope, etc.",
)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key