make config come as localhost but global variable be set as the transformed endpoint
This commit is contained in:
parent
d018a96923
commit
f7c2561760
1 changed files with 2 additions and 3 deletions
|
|
@ -442,8 +442,6 @@ async def onboarding(request, flows_service):
|
|||
{"error": "endpoint must be a non-empty string"}, status_code=400
|
||||
)
|
||||
current_config.provider.endpoint = body["endpoint"].strip()
|
||||
if "model_provider" in body and body["model_provider"].strip() == "ollama":
|
||||
current_config.provider.endpoint = transform_localhost_url(body["endpoint"].strip())
|
||||
config_updated = True
|
||||
|
||||
if "project_id" in body:
|
||||
|
|
@ -540,7 +538,8 @@ async def onboarding(request, flows_service):
|
|||
|
||||
# Set base URL for Ollama provider
|
||||
if provider == "ollama" and "endpoint" in body:
|
||||
endpoint = body["endpoint"]
|
||||
endpoint = transform_localhost_url(body["endpoint"])
|
||||
|
||||
await clients._create_langflow_global_variable(
|
||||
"OLLAMA_BASE_URL", endpoint, modify=True
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue