You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

external_knowledge_entities.py 578B

1234567891011121314151617181920212223242526
  1. from typing import Literal, Union
  2. from pydantic import BaseModel
  3. class AuthorizationConfig(BaseModel):
  4. type: Literal[None, "basic", "bearer", "custom"]
  5. api_key: Union[None, str] = None
  6. header: Union[None, str] = None
  7. class Authorization(BaseModel):
  8. type: Literal["no-auth", "api-key"]
  9. config: AuthorizationConfig | None = None
  10. class ProcessStatusSetting(BaseModel):
  11. request_method: str
  12. url: str
  13. class ExternalKnowledgeApiSetting(BaseModel):
  14. url: str
  15. request_method: str
  16. headers: dict | None = None
  17. params: dict | None = None