Skip to content

Commit

Permalink
fix: Misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Julep Developers committed Sep 14, 2024
1 parent 61e4ed8 commit c0402d4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
24 changes: 12 additions & 12 deletions agents-api/agents_api/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@
testing=testing,
)

# if debug or testing:
# Print the loaded environment variables for debugging purposes.
print("Environment variables:")
pprint(environment)
print()

# Yell if testing is enabled
print("@" * 80)
print(
f"@@@ Running in {'testing' if testing else 'debug'} mode. This should not be enabled in production. @@@"
)
print("@" * 80)
if debug or testing:
# Print the loaded environment variables for debugging purposes.
print("Environment variables:")
pprint(environment)
print()

# Yell if testing is enabled
print("@" * 80)
print(
f"@@@ Running in {'testing' if testing else 'debug'} mode. This should not be enabled in production. @@@"
)
print("@" * 80)
6 changes: 4 additions & 2 deletions agents-api/agents_api/routers/sessions/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ async def chat(
chat_context.merge_settings(chat_input)
settings: dict = chat_context.settings.model_dump()
env: dict = chat_context.get_chat_environment()
settings["model"] = f"openai/{settings['model']}" # litellm proxy idiosyncracy

# Render the messages
new_raw_messages = [msg.model_dump() for msg in chat_input.messages]

# Render the messages
past_messages, doc_references = await gather_messages(
developer=developer,
session_id=session_id,
Expand All @@ -73,7 +75,7 @@ async def chat(
# Get the response from the model
model_response = await litellm.acompletion(
messages=messages,
tools=tools,
tools=tools or None,
user=str(developer.id), # For tracking usage
tags=developer.tags, # For filtering models in litellm
**settings,
Expand Down
1 change: 1 addition & 0 deletions agents-api/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ x--shared-environment: &shared-environment
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_PUBLIC_PORT: ${AGENTS_API_PUBLIC_PORT:-80}
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
4 changes: 0 additions & 4 deletions embedding-service/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ services:
profiles:
- '' # Acts as a default profile. See: https://stackoverflow.com/questions/75758174/how-to-make-profile-default-for-docker-compose
- cpu
#
# Note: Adding these for convenience so this runs when `docker compose up` is run
- multi-tenant
- temporal-ui
platform: linux/amd64 # Temp fix for Mac M-series chips

text-embeddings-inference-gpu:
Expand Down

0 comments on commit c0402d4

Please sign in to comment.