mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-01-25 08:23:37 +08:00
13 lines
337 B
Python
13 lines
337 B
Python
from typing import Literal
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class RouteQuery(BaseModel):
|
|
"""Route a user query to the most relevant datasource."""
|
|
|
|
datasource: Literal["vectorstore", "web_search"] = Field(
|
|
...,
|
|
description="Given a user question choose to route it to web search or a vectorstore.",
|
|
)
|