Add literal endpoint types

This commit is contained in:
Matt Zhou
2024-10-02 09:45:13 -07:00
parent b698cb1981
commit b98ecb4b1c

View File

@@ -17,9 +17,23 @@ class LLMConfig(BaseModel):
# TODO: 🤮 don't default to a vendor! bug city!
model: str = Field(..., description="LLM model name. ")
model_endpoint_type: Literal["openai", "anthropic", "cohere", "google_ai", "azure", "groq", "ollama"] = Field(
..., description="The endpoint type for the model."
)
model_endpoint_type: Literal[
"openai",
"anthropic",
"cohere",
"google_ai",
"azure",
"groq",
"ollama",
"webui",
"webui-legacy",
"lmstudio",
"lmstudio-legacy",
"llamacpp",
"koboldcpp",
"vllm",
"hugging-face",
] = Field(..., description="The endpoint type for the model.")
model_endpoint: str = Field(..., description="The endpoint for the model.")
model_wrapper: Optional[str] = Field(None, description="The wrapper for the model.")
context_window: int = Field(..., description="The context window size for the model.")