repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | from typing import Optional |
| #2 | |
| #3 | from pydantic import BaseModel, Field, field_validator |
| #4 | |
| #5 | |
| #6 | class LlmConfig(BaseModel): |
| #7 | provider: str = Field(description="Provider of the LLM (e.g., 'ollama', 'openai')", default="openai") |
| #8 | config: Optional[dict] = Field(description="Configuration for the specific LLM", default={}) |
| #9 | |
| #10 | @field_validator("config") |
| #11 | def validate_config(cls, v, values): |
| #12 | provider = values.data.get("provider") |
| #13 | if provider in ( |
| #14 | "openai", |
| #15 | "ollama", |
| #16 | "anthropic", |
| #17 | "groq", |
| #18 | "together", |
| #19 | "aws_bedrock", |
| #20 | "litellm", |
| #21 | "azure_openai", |
| #22 | "openai_structured", |
| #23 | "azure_openai_structured", |
| #24 | "gemini", |
| #25 | "deepseek", |
| #26 | "xai", |
| #27 | "sarvam", |
| #28 | "lmstudio", |
| #29 | "vllm", |
| #30 | "langchain", |
| #31 | ): |
| #32 | return v |
| #33 | else: |
| #34 | raise ValueError(f"Unsupported LLM provider: {provider}") |
| #35 |