Skip to content

Commit 9c15337

Browse files
hjlarryJunXu01
authored andcommitted
fix: allow external knowledge api use simple host (langgenius#9966)
1 parent d13a351 commit 9c15337

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/services/external_knowledge_service.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def check_endpoint_and_api_key(settings: dict):
7070

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

0 commit comments

Comments
 (0)