mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-07 09:56:49 +08:00
fix: allow external knowledge api use simple host (#9966)
This commit is contained in:
@@ -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}"})
|
||||
|
||||
Reference in New Issue
Block a user