Overhaul demos directory: cleanup, restructure, and standardize configs (#760)
|
|
@ -1,13 +1,11 @@
|
|||
version: v0.1.0
|
||||
version: v0.3.0
|
||||
|
||||
listeners:
|
||||
ingress_traffic:
|
||||
address: 0.0.0.0
|
||||
- type: prompt
|
||||
name: prompt_listener
|
||||
port: 10000
|
||||
message_format: openai
|
||||
timeout: 30s
|
||||
|
||||
llm_providers:
|
||||
model_providers:
|
||||
- model: openai/gpt-4o-mini
|
||||
access_key: $OPENAI_API_KEY
|
||||
default: true
|
||||
25
demos/advanced/currency_exchange/docker-compose.yaml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
services:
|
||||
anythingllm:
|
||||
image: mintplexlabs/anythingllm
|
||||
restart: always
|
||||
ports:
|
||||
- "3001:3001"
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
environment:
|
||||
- STORAGE_DIR=/app/server/storage
|
||||
- LLM_PROVIDER=generic-openai
|
||||
- GENERIC_OPEN_AI_BASE_PATH=http://host.docker.internal:10000/v1
|
||||
- GENERIC_OPEN_AI_MODEL_PREF=gpt-4o-mini
|
||||
- GENERIC_OPEN_AI_MODEL_TOKEN_LIMIT=128000
|
||||
- GENERIC_OPEN_AI_API_KEY=sk-placeholder
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
jaeger:
|
||||
build:
|
||||
context: ../../shared/jaeger
|
||||
ports:
|
||||
- "16686:16686"
|
||||
- "4317:4317"
|
||||
- "4318:4318"
|
||||
|
|
@ -1,13 +1,11 @@
|
|||
version: v0.1.0
|
||||
version: v0.3.0
|
||||
|
||||
listeners:
|
||||
egress_traffic:
|
||||
address: 0.0.0.0
|
||||
- type: model
|
||||
name: model_listener
|
||||
port: 12000
|
||||
message_format: openai
|
||||
timeout: 30s
|
||||
|
||||
llm_providers:
|
||||
model_providers:
|
||||
- model: openai/gpt-4o-mini
|
||||
access_key: $OPENAI_API_KEY
|
||||
default: true
|
||||
|
|
@ -20,3 +18,6 @@ model_aliases:
|
|||
target: gpt-4o-mini
|
||||
arch.reason.v1:
|
||||
target: o3
|
||||
|
||||
tracing:
|
||||
random_sampling: 100
|
||||
|
|
@ -1,18 +1,16 @@
|
|||
version: v0.1.0
|
||||
version: v0.3.0
|
||||
|
||||
listeners:
|
||||
ingress_traffic:
|
||||
address: 0.0.0.0
|
||||
- type: prompt
|
||||
name: prompt_listener
|
||||
port: 10000
|
||||
message_format: openai
|
||||
timeout: 30s
|
||||
|
||||
endpoints:
|
||||
rag_energy_source_agent:
|
||||
endpoint: host.docker.internal:18083
|
||||
connect_timeout: 0.005s
|
||||
|
||||
llm_providers:
|
||||
model_providers:
|
||||
- access_key: $OPENAI_API_KEY
|
||||
model: openai/gpt-4o-mini
|
||||
default: true
|
||||
28
demos/advanced/multi_turn_rag/docker-compose.yaml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
services:
|
||||
rag_energy_source_agent:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "18083:80"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl" ,"http://localhost:80/healthz"]
|
||||
interval: 5s
|
||||
retries: 20
|
||||
|
||||
anythingllm:
|
||||
image: mintplexlabs/anythingllm
|
||||
restart: always
|
||||
ports:
|
||||
- "3001:3001"
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
environment:
|
||||
- STORAGE_DIR=/app/server/storage
|
||||
- LLM_PROVIDER=generic-openai
|
||||
- GENERIC_OPEN_AI_BASE_PATH=http://host.docker.internal:10000/v1
|
||||
- GENERIC_OPEN_AI_MODEL_PREF=gpt-4o-mini
|
||||
- GENERIC_OPEN_AI_MODEL_TOKEN_LIMIT=128000
|
||||
- GENERIC_OPEN_AI_API_KEY=sk-placeholder
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
Before Width: | Height: | Size: 852 KiB After Width: | Height: | Size: 852 KiB |
|
|
@ -1,13 +1,11 @@
|
|||
version: v0.1.0
|
||||
version: v0.3.0
|
||||
|
||||
listeners:
|
||||
ingress_traffic:
|
||||
address: 0.0.0.0
|
||||
- type: prompt
|
||||
name: prompt_listener
|
||||
port: 10000
|
||||
message_format: openai
|
||||
timeout: 30s
|
||||
|
||||
llm_providers:
|
||||
model_providers:
|
||||
- access_key: $OPENAI_API_KEY
|
||||
model: openai/gpt-4o
|
||||
|
||||
25
demos/advanced/stock_quote/docker-compose.yaml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
services:
|
||||
anythingllm:
|
||||
image: mintplexlabs/anythingllm
|
||||
restart: always
|
||||
ports:
|
||||
- "3001:3001"
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
environment:
|
||||
- STORAGE_DIR=/app/server/storage
|
||||
- LLM_PROVIDER=generic-openai
|
||||
- GENERIC_OPEN_AI_BASE_PATH=http://host.docker.internal:10000/v1
|
||||
- GENERIC_OPEN_AI_MODEL_PREF=gpt-4o-mini
|
||||
- GENERIC_OPEN_AI_MODEL_TOKEN_LIMIT=128000
|
||||
- GENERIC_OPEN_AI_API_KEY=sk-placeholder
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
jaeger:
|
||||
build:
|
||||
context: ../../shared/jaeger
|
||||
ports:
|
||||
- "16686:16686"
|
||||
- "4317:4317"
|
||||
- "4318:4318"
|
||||
|
Before Width: | Height: | Size: 673 KiB After Width: | Height: | Size: 673 KiB |
|
|
@ -37,7 +37,7 @@ Plano acts as a **framework-agnostic proxy and data plane** that:
|
|||
|
||||
```bash
|
||||
# From the demo directory
|
||||
cd demos/use_cases/multi_agent_with_crewai_langchain
|
||||
cd demos/agent_orchestration/multi_agent_crewai_langchain
|
||||
|
||||
# Build and start all services
|
||||
docker-compose up -d
|
||||
|
Before Width: | Height: | Size: 331 KiB After Width: | Height: | Size: 331 KiB |
|
Before Width: | Height: | Size: 4 MiB After Width: | Height: | Size: 4 MiB |
|
|
@ -7,7 +7,7 @@ This demo shows how you can use Plano gateway to manage keys and route to upstre
|
|||
```sh
|
||||
sh run_demo.sh
|
||||
```
|
||||
1. Navigate to http://localhost:18080/
|
||||
1. Navigate to http://localhost:3001/
|
||||
|
||||
Following screen shows an example of interaction with Plano gateway showing dynamic routing. You can select between different LLMs using "override model" option in the chat UI.
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ $ curl --header 'Content-Type: application/json' \
|
|||
"messages": {
|
||||
"role": "assistant",
|
||||
"tool_calls": null,
|
||||
"content": "Hello! How can I assist you today? Let's chat about anything you'd like. 😊"
|
||||
"content": "Hello! How can I assist you today? Let's chat about anything you'd like."
|
||||
},
|
||||
"finish_reason": "stop"
|
||||
}
|
||||
|
|
@ -47,11 +47,7 @@ $ curl --header 'Content-Type: application/json' \
|
|||
```
|
||||
|
||||
# Observability
|
||||
Plano gateway publishes stats endpoint at http://localhost:19901/stats. In this demo we are using prometheus to pull stats from Plano and we are using grafana to visualize the stats in dashboard. To see grafana dashboard follow instructions below,
|
||||
|
||||
1. Navigate to http://localhost:3000/ to open grafana UI (use admin/grafana as credentials)
|
||||
1. From grafana left nav click on dashboards and select "Intelligent Gateway Overview" to view Plano gateway stats
|
||||
1. For tracing you can head over to http://localhost:16686/ to view recent traces.
|
||||
For tracing you can head over to http://localhost:16686/ to view recent traces.
|
||||
|
||||
Following is a screenshot of tracing UI showing call received by Plano gateway and making upstream call to LLM,
|
||||
|
||||
|
|
@ -37,13 +37,3 @@ services:
|
|||
- "16686:16686"
|
||||
- "4317:4317"
|
||||
- "4318:4318"
|
||||
|
||||
prometheus:
|
||||
build:
|
||||
context: ../../shared/prometheus
|
||||
|
||||
grafana:
|
||||
build:
|
||||
context: ../../shared/grafana
|
||||
ports:
|
||||
- "3000:3000"
|
||||
|
Before Width: | Height: | Size: 273 KiB After Width: | Height: | Size: 273 KiB |
|
Before Width: | Height: | Size: 284 KiB After Width: | Height: | Size: 284 KiB |
28
demos/getting_started/weather_forecast/README.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Function calling
|
||||
|
||||
This demo shows how you can use Plano's core function calling capabilities.
|
||||
|
||||
# Starting the demo
|
||||
|
||||
1. Please make sure the [pre-requisites](https://github.com/katanemo/arch/?tab=readme-ov-file#prerequisites) are installed correctly
|
||||
2. Start Plano
|
||||
|
||||
3. ```sh
|
||||
sh run_demo.sh
|
||||
```
|
||||
4. Navigate to http://localhost:3001/
|
||||
5. You can type in queries like "how is the weather?"
|
||||
|
||||
Here is a sample interaction,
|
||||
<img width="575" alt="image" src="https://github.com/user-attachments/assets/e0929490-3eb2-4130-ae87-a732aea4d059">
|
||||
|
||||
## Tracing
|
||||
|
||||
To see a tracing dashboard, navigate to http://localhost:16686/ to open Jaeger UI.
|
||||
|
||||
### Stopping Demo
|
||||
|
||||
1. To end the demo, run the following command:
|
||||
```sh
|
||||
sh run_demo.sh down
|
||||
```
|
||||
|
|
@ -1,17 +1,13 @@
|
|||
version: v0.1.0
|
||||
version: v0.3.0
|
||||
|
||||
listeners:
|
||||
ingress_traffic:
|
||||
address: 0.0.0.0
|
||||
- type: prompt
|
||||
name: prompt_listener
|
||||
port: 10000
|
||||
message_format: openai
|
||||
timeout: 30s
|
||||
|
||||
egress_traffic:
|
||||
address: 0.0.0.0
|
||||
- type: model
|
||||
name: model_listener
|
||||
port: 12000
|
||||
message_format: openai
|
||||
timeout: 30s
|
||||
|
||||
endpoints:
|
||||
weather_forecast_service:
|
||||
|
|
@ -22,7 +18,7 @@ overrides:
|
|||
# confidence threshold for prompt target intent matching
|
||||
prompt_target_intent_matching_threshold: 0.6
|
||||
|
||||
llm_providers:
|
||||
model_providers:
|
||||
- access_key: $GROQ_API_KEY
|
||||
model: groq/llama-3.2-3b-preview
|
||||
|
||||
27
demos/getting_started/weather_forecast/docker-compose.yaml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
services:
|
||||
weather_forecast_service:
|
||||
build:
|
||||
context: ./
|
||||
environment:
|
||||
- OLTP_HOST=http://jaeger:4317
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
ports:
|
||||
- "18083:80"
|
||||
|
||||
anythingllm:
|
||||
image: mintplexlabs/anythingllm
|
||||
restart: always
|
||||
ports:
|
||||
- "3001:3001"
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
environment:
|
||||
- STORAGE_DIR=/app/server/storage
|
||||
- LLM_PROVIDER=generic-openai
|
||||
- GENERIC_OPEN_AI_BASE_PATH=http://host.docker.internal:10000/v1
|
||||
- GENERIC_OPEN_AI_MODEL_PREF=gpt-4o-mini
|
||||
- GENERIC_OPEN_AI_MODEL_TOKEN_LIMIT=128000
|
||||
- GENERIC_OPEN_AI_API_KEY=sk-placeholder
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||