Explorar el Código

fix: allow external knowledge api use simple host (#9966)

tags/0.11.0
非法操作 hace 1 año
padre
commit
eb69896355
No account linked to committer's email address
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      api/services/external_knowledge_service.py

+ 1
- 1
api/services/external_knowledge_service.py Ver fichero

@@ -70,7 +70,7 @@ class ExternalDatasetService:

endpoint = f"{settings['endpoint']}/retrieval"
api_key = settings["api_key"]
if not validators.url(endpoint):
if not validators.url(endpoint, simple_host=True):
raise ValueError(f"invalid endpoint: {endpoint}")
try:
response = httpx.post(endpoint, headers={"Authorization": f"Bearer {api_key}"})

Cargando…
Cancelar
Guardar