Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions samples/agentic-strands/app/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ def chat():
print(f"Error in /chat endpoint: {str(e)}")
return jsonify({"error": str(e), "response": str(e)}), 500

@app.get("/health")
def health_check():
"""Health check endpoint"""
return "ok"


# Start Flask server when this script is run directly
if __name__ == '__main__':

Expand Down
14 changes: 13 additions & 1 deletion samples/agentic-strands/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,25 @@ services:
LLM_URL: http://llm/api/v1/
LLM_MODEL: default
OPENAI_API_KEY: FAKE_TOKEN
healthcheck:
test:
[
"CMD",
"python3",
"-c",
"import urllib.request; exit(0) if urllib.request.urlopen('http://localhost:5001/health').status == 200 else exit(1)",
]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
depends_on:
- llm

llm:
environment:
- OPENAI_API_KEY=FAKE_TOKEN
image: defangio/openai-access-gateway:06339c7
image: defangio/openai-access-gateway
ports:
- target: 80
published: 80
Expand Down
Loading