Skip to content

Commit

Permalink
fix(agents-api): Add protocol to vars
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
creatorrr committed Sep 9, 2024
1 parent 34cd65b commit 4d9c5d2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ EMBEDDING_SERVICE_BASE=http://text-embeddings-inference-<gpu|cpu> # Use the 'gp
# ---------

# AGENTS_API_HOSTNAME=localhost
# AGENTS_API_PROTOCOL=http
# AGENTS_API_KEY_HEADER_NAME=Authorization
# AGENTS_API_URL=http://agents-api:8080
# TRUNCATE_EMBED_TEXT=true
Expand Down Expand Up @@ -66,4 +67,4 @@ EMBEDDING_SERVICE_BASE=http://text-embeddings-inference-<gpu|cpu> # Use the 'gp
# NVIDIA_NIM_API_KEY=<your_nvidia_nim_api_key>
# GITHUB_API_KEY=<your_github_api_key>
# VOYAGE_API_KEY=<your_voyage_api_key>
# GOOGLE_APPLICATION_CREDENTIALS=.keys/julep-vertexai-svc.json
# GOOGLE_APPLICATION_CREDENTIALS=.keys/julep-vertexai-svc.json
1 change: 1 addition & 0 deletions agents-api/agents_api/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# App
# ---
multi_tenant_mode: bool = env.bool("AGENTS_API_MULTI_TENANT_MODE", default=False)
protocol: str = env.str("AGENTS_API_PROTOCOL", default="http")
hostname: str = env.str("AGENTS_API_HOSTNAME", default="localhost")
public_port: int = env.int("AGENTS_API_PUBLIC_PORT", default=80)
api_prefix: str = env.str("AGENTS_API_PREFIX", default="")
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async def scalar_html():
return get_scalar_api_reference(
openapi_url=app.openapi_url[1:], # Remove leading '/'
title=app.title,
servers=[{"url": f"http://{hostname}:{public_port}{api_prefix}"}],
servers=[{"url": f"{protocol}://{hostname}:{public_port}{api_prefix}"}],
)


Expand Down
3 changes: 2 additions & 1 deletion agents-api/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ x--shared-environment: &shared-environment
AGENTS_API_KEY: ${AGENTS_API_KEY}
AGENTS_API_KEY_HEADER_NAME: ${AGENTS_API_KEY_HEADER_NAME:-Authorization}
AGENTS_API_HOSTNAME: ${AGENTS_API_HOSTNAME:-localhost}
AGENTS_API_PROTOCOL: ${AGENTS_API_PROTOCOL:-http}
AGENTS_API_URL: ${AGENTS_API_URL:-http://agents-api:8080}
COZO_AUTH_TOKEN: ${COZO_AUTH_TOKEN}
COZO_HOST: ${COZO_HOST:-http://memory-store:9070}
Expand Down Expand Up @@ -107,4 +108,4 @@ services:
path: ./migrations
target: /app/migrations
- action: rebuild
path: Dockerfile.migration
path: Dockerfile.migration

0 comments on commit 4d9c5d2

Please sign in to comment.