plano/demos/advanced/multi_turn_rag/main.py
Adil Hafeez 78f761ef75
Clean up dead demos and restructure directory layout
Phase 1 - Remove dead/duplicate content:
- Delete demos/samples_java/ (incomplete Java demo)
- Delete demos/shared/chatbot_ui/ (replaced by AnythingLLM)
- Delete demos/shared/grafana/, prometheus/, logfire/, honeycomb/, signoz/
  (legacy observability stacks; only jaeger is retained)
- Delete variant docker-compose files (honeycomb, logfire, signoz, jaeger)
- Delete demos/use_cases/spotify_bearer_auth/run_demo.sh (stale script)

Phase 2 - Restructure into semantic categories:
- getting_started/  : weather_forecast, llm_gateway
- agent_orchestration/ : travel_agents, multi_agent_crewai_langchain
- llm_routing/       : model_alias_routing, preference_based_routing, claude_code_router
- filter_chains/     : http_filter, mcp_filter
- integrations/      : ollama, spotify_bearer_auth
- advanced/          : model_choice_test_harness, multi_turn_rag,
                       currency_exchange, stock_quote

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 01:43:31 -08:00

42 lines
1.1 KiB
Python

import os
import gradio as gr
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
from typing import Optional
from openai import OpenAI
app = FastAPI()
# Define the request model
class EnergySourceRequest(BaseModel):
energy_source: str
consideration: Optional[str] = None
class EnergySourceResponse(BaseModel):
energy_source: str
consideration: Optional[str] = None
# Post method for device summary
@app.post("/agent/energy_source_info")
def get_workforce(request: EnergySourceRequest):
"""
Endpoint to get details about energy source
"""
considertion = "You don't have any specific consideration. Feel free to talk in a more open ended fashion"
if request.consideration is not None:
considertion = f"Add specific focus on the following consideration when you summarize the content for the energy source: {request.consideration}"
response = {
"energy_source": request.energy_source,
"consideration": considertion,
}
return response
if __name__ == "__main__":
app.run(debug=True)