Skip to content

Commit

Permalink
Merge commit 'abb53f290cb9a73a37923a282baf757e4072d0c9' into test-wor…
Browse files Browse the repository at this point in the history
…kflow
  • Loading branch information
chrislott committed Sep 24, 2024
2 parents 7b8143b + abb53f2 commit ba51010
Show file tree
Hide file tree
Showing 13 changed files with 125 additions and 133 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ jobs:
cp env-example.txt .env
echo "Contents of ${{ matrix.project }}:"
ls -la
echo "Running docker-compose up"
docker-compose up --build --force-recreate --renew-anon-volumes --remove-orphans
echo "Running docker-compose down"
docker-compose down --volumes --remove-orphans
echo "Running docker-compose build"
docker-compose build --no-cache
cd ..
env:
ACTIONS_STEP_DEBUG: true
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ This repository contains the reasoning applications built on top of the xRx fram

The reasoning systems process input, generate responses and manage the overall conversation flow within the xRx framework. Each subdirectory in this folder represents a different application, including a specific reasoning agent and an UI.

> **Documentation.** Check out the full documentation [here](https://8090-inc.github.io/xrx-core/).
## Available Reasoning Applications
1. [Simple App](./simple-app): A simple template for creating custom reasoning apps.
2. [Shopify App](./shopify-app): An app designed to handle app-based interactions with a Shopify store.
3. [Wolfram Assistant App](./wolfram-assistant-app): An app designed to handle math and physics-based interactions.
4. [Patient Information App](./patient-information-app): An app designed to collect and manage patient information before a doctor's visit.
2. [Pizza Store](./pizza-store): An app designed to handle app-based interactions with a Pizza Store.
3. [Shopify App](./shopify-app): An app designed to handle app-based interactions with a Shopify store.
4. [Wolfram Assistant App](./wolfram-assistant-app): An app designed to handle math and physics-based interactions.
5. [Patient Information App](./patient-information-app): An app designed to collect and manage patient information before a doctor's visit.

## Usage
To get started with xRx, follow these steps:
Expand Down Expand Up @@ -105,4 +108,8 @@ The workflow has debug logging enabled. Check the workflow run logs in the GitHu

## Project Structure

Ensure each subdirectory that should be built has a valid `docker-compose.yml` file.
Ensure each subdirectory that should be built has a valid `docker-compose.yml` file.

## Updates

- 2024-09-23: We are temporarily removing the guardrails proxy and reasoning service from the docker compose setup, due to breaking changes from guardrailsai.
22 changes: 11 additions & 11 deletions patient-information-app/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ services:
networks:
- xrx_network

xrx-guardrails:
container_name: xrx-guardrails
build:
context: ./xrx-core/guardrails-proxy
dockerfile: Dockerfile
ports:
- 8004:8004
env_file:
- .env
networks:
- xrx_network
# xrx-guardrails:
# container_name: xrx-guardrails
# build:
# context: ./xrx-core/guardrails-proxy
# dockerfile: Dockerfile
# ports:
# - 8004:8004
# env_file:
# - .env
# networks:
# - xrx_network

xrx-redis:
image: "redis:alpine"
Expand Down
22 changes: 11 additions & 11 deletions patient-information-app/env-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ GROQ_STT_API_KEY="your_groq_api_key_here"
# === Text-to-Speech (TTS) Configuration ===
TTS_PROVIDER="elevenlabs" # Alternative providers: "deepgram", "openai", "cartesia"
ELEVENLABS_API_KEY="your_elevenlabs_api_key"
ELEVENLABS_VOICE_ID="tnSpp4vdxKPjI9w0GnoV"
ELEVENLABS_VOICE_ID="your_elevenlabs_voice_id"


# =============================================
Expand All @@ -35,22 +35,22 @@ DG_API_KEY="your_deepgram_api_key" # required if you want to use Deepgram
# Get your API keys from the following URLs:
# - Deepgram: https://deepgram.com/
# - OpenAI: https://openai.com/
TTS_SAMPLE_RATE="24000"
# TTS_SAMPLE_RATE="24000"
# Deepgram configuration
DG_TTS_MODEL_VOICE="aura-asteria-en"
DG_API_KEY="your_deepgram_api_key"
# DG_TTS_MODEL_VOICE="aura-asteria-en"
# DG_API_KEY="your_deepgram_api_key"
# OpenAI configuration
OPENAI_API_KEY="your_openai_api_key"
OPENAI_TTS_MODEL="tts-1"
OPENAI_TTS_VOICE="alloy"
# OPENAI_API_KEY="your_openai_api_key"
# OPENAI_TTS_MODEL="tts-1"
# OPENAI_TTS_VOICE="alloy"
# CACHE_DIR="your_cache_directory_path"


# === Guardrails Proxy Configuration ===
AGENT_HOST="xrx-guardrails"
AGENT_PORT="8004"
GUARDRAILS_AGENT_HOST="xrx-reasoning"
GUARDRAILS_AGENT_PORT="8003"
# AGENT_HOST="xrx-guardrails"
# AGENT_PORT="8004"
# GUARDRAILS_AGENT_HOST="xrx-reasoning"
# GUARDRAILS_AGENT_PORT="8003"

# === LLM Observability Configuration ===
LLM_OBSERVABILITY_LIBRARY="none"
Expand Down
14 changes: 1 addition & 13 deletions patient-information-app/nextjs-client/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,6 @@ export default function Home() {
tts_sample_rate: parseInt(TTS_SAMPLE_RATE, 10),
});



const recordingContextRef = useRef<AudioContext | null>(null);
const playbackContextRef = useRef<AudioContext | null>(null);
const incomingAudioBufferRef = useRef<ArrayBuffer[]>([]);
const isPlayingAudioRef = useRef(false);

const [isSpeechDetected, setIsSpeechDetected] = useState(false);
const isSpeechDetectedRef = useRef(false);

const audioWorkletNodeRef = useRef<AudioWorkletNode | null>(null);
const mediaStreamRef = useRef<MediaStream | null>(null);
const [message, setMessage] = useState("");

const [latestWidget, setLatestWidget] = useState<{
Expand Down Expand Up @@ -238,7 +226,7 @@ export default function Home() {
>
{" "}
<div className={styles.listeningIndicatorContainer}>
{isSpeechDetected && (
{isUserSpeaking && (
<motion.div
className={styles.listeningIndicator}
initial={{ scaleY: 0 }}
Expand Down
22 changes: 11 additions & 11 deletions pizza-store/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ services:
networks:
- xrx_network

xrx-guardrails:
container_name: xrx-guardrails
build:
context: ./xrx-core/guardrails-proxy
dockerfile: Dockerfile
ports:
- 8004:8004
env_file:
- .env
networks:
- xrx_network
# xrx-guardrails:
# container_name: xrx-guardrails
# build:
# context: ./xrx-core/guardrails-proxy
# dockerfile: Dockerfile
# ports:
# - 8004:8004
# env_file:
# - .env
# networks:
# - xrx_network

xrx-redis:
image: "redis:alpine"
Expand Down
20 changes: 10 additions & 10 deletions pizza-store/env-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ GROQ_STT_API_KEY="your_groq_api_key_here"
# === Text-to-Speech (TTS) Configuration ===
TTS_PROVIDER="elevenlabs" # Alternative providers: "deepgram", "openai", "cartesia"
ELEVENLABS_API_KEY="your_elevenlabs_api_key"
ELEVENLABS_VOICE_ID="tnSpp4vdxKPjI9w0GnoV"
ELEVENLABS_VOICE_ID="your_elevenlabs_voice_id"

# === Shopify Store ===
NEXT_PUBLIC_AGENT="pizza-agent" # or shoe-agent to display a shoe store
Expand All @@ -44,20 +44,20 @@ DG_API_KEY="your_deepgram_api_key" # required if you want to use Deepgram
# - Deepgram: https://deepgram.com/
# - OpenAI: https://openai.com/
# Deepgram configuration
DG_TTS_MODEL_VOICE="aura-asteria-en"
DG_API_KEY="your_deepgram_api_key"
# DG_TTS_MODEL_VOICE="aura-asteria-en"
# DG_API_KEY="your_deepgram_api_key"
# OpenAI configuration
OPENAI_API_KEY="your_openai_api_key"
OPENAI_TTS_MODEL="tts-1"
OPENAI_TTS_VOICE="alloy"
# OPENAI_API_KEY="your_openai_api_key"
# OPENAI_TTS_MODEL="tts-1"
# OPENAI_TTS_VOICE="alloy"
# CACHE_DIR="your_cache_directory_path"


# === Guardrails Proxy Configuration ===
AGENT_HOST="xrx-guardrails"
AGENT_PORT="8004"
GUARDRAILS_AGENT_HOST="xrx-reasoning"
GUARDRAILS_AGENT_PORT="8003"
# AGENT_HOST="xrx-guardrails"
# AGENT_PORT="8004"
# GUARDRAILS_AGENT_HOST="xrx-reasoning"
# GUARDRAILS_AGENT_PORT="8003"

# === LLM Observability Configuration ===
LLM_OBSERVABILITY_LIBRARY="none"
Expand Down
22 changes: 11 additions & 11 deletions shopify-app/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ services:
networks:
- xrx_network

xrx-guardrails:
container_name: xrx-guardrails
build:
context: ./xrx-core/guardrails-proxy
dockerfile: Dockerfile
ports:
- 8004:8004
env_file:
- .env
networks:
- xrx_network
# xrx-guardrails:
# container_name: xrx-guardrails
# build:
# context: ./xrx-core/guardrails-proxy
# dockerfile: Dockerfile
# ports:
# - 8004:8004
# env_file:
# - .env
# networks:
# - xrx_network

xrx-redis:
image: "redis:alpine"
Expand Down
22 changes: 11 additions & 11 deletions shopify-app/env-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ GROQ_STT_API_KEY="your_groq_api_key_here"
# === Text-to-Speech (TTS) Configuration ===
TTS_PROVIDER="elevenlabs" # Alternative providers: "deepgram", "openai", "cartesia"
ELEVENLABS_API_KEY="your_elevenlabs_api_key"
ELEVENLABS_VOICE_ID="tnSpp4vdxKPjI9w0GnoV"
ELEVENLABS_VOICE_ID="your_elevenlabs_voice_id"

# === Shopify Store ===
NEXT_PUBLIC_AGENT="pizza-agent" # or shoe-agent to display a shoe store
Expand All @@ -44,22 +44,22 @@ DG_API_KEY="your_deepgram_api_key" # required if you want to use Deepgram
# Get your API keys from the following URLs:
# - Deepgram: https://deepgram.com/
# - OpenAI: https://openai.com/
TTS_SAMPLE_RATE="24000"
# TTS_SAMPLE_RATE="24000"
# Deepgram configuration
DG_TTS_MODEL_VOICE="aura-asteria-en"
DG_API_KEY="your_deepgram_api_key"
# DG_TTS_MODEL_VOICE="aura-asteria-en"
# DG_API_KEY="your_deepgram_api_key"
# OpenAI configuration
OPENAI_API_KEY="your_openai_api_key"
OPENAI_TTS_MODEL="tts-1"
OPENAI_TTS_VOICE="alloy"
# OPENAI_API_KEY="your_openai_api_key"
# OPENAI_TTS_MODEL="tts-1"
# OPENAI_TTS_VOICE="alloy"
# CACHE_DIR="your_cache_directory_path"


# === Guardrails Proxy Configuration ===
AGENT_HOST="xrx-guardrails"
AGENT_PORT="8004"
GUARDRAILS_AGENT_HOST="xrx-reasoning"
GUARDRAILS_AGENT_PORT="8003"
# AGENT_HOST="xrx-guardrails"
# AGENT_PORT="8004"
# GUARDRAILS_AGENT_HOST="xrx-reasoning"
# GUARDRAILS_AGENT_PORT="8003"

# === LLM Observability Configuration ===
LLM_OBSERVABILITY_LIBRARY="none"
Expand Down
22 changes: 11 additions & 11 deletions simple-app/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ services:
networks:
- xrx_network

xrx-guardrails:
container_name: xrx-guardrails
build:
context: ./xrx-core/guardrails-proxy
dockerfile: Dockerfile
ports:
- 8004:8004
env_file:
- .env
networks:
- xrx_network
# xrx-guardrails:
# container_name: xrx-guardrails
# build:
# context: ./xrx-core/guardrails-proxy
# dockerfile: Dockerfile
# ports:
# - 8004:8004
# env_file:
# - .env
# networks:
# - xrx_network

xrx-redis:
image: "redis:alpine"
Expand Down
27 changes: 13 additions & 14 deletions simple-app/env-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ GROQ_STT_API_KEY="your_groq_api_key_here"
# === Text-to-Speech (TTS) Configuration ===
TTS_PROVIDER="elevenlabs" # Alternative providers: "deepgram", "openai", "cartesia"
ELEVENLABS_API_KEY="your_elevenlabs_api_key"
ELEVENLABS_VOICE_ID="tnSpp4vdxKPjI9w0GnoV"
ELEVENLABS_VOICE_ID="your_elevenlabs_voice_id"


# =============================================
Expand All @@ -28,29 +28,28 @@ ELEVENLABS_VOICE_ID="tnSpp4vdxKPjI9w0GnoV"
INITIAL_RESPONSE="Hello! How can I help you?"

# === Speech-to-Text (STT) Configuration ===
DG_API_KEY="your_deepgram_api_key" # required if you want to use Deepgram
#STT_SAMPLE_RATE="16000"
# DG_API_KEY="your_deepgram_api_key" # required if you want to use Deepgram
# STT_SAMPLE_RATE="16000"

# === Text-to-Speech (TTS) Configuration ===
# Get your API keys from the following URLs:
# - Deepgram: https://deepgram.com/
# - OpenAI: https://openai.com/
TTS_SAMPLE_RATE="24000"
# TTS_SAMPLE_RATE="24000"
# Deepgram configuration
DG_TTS_MODEL_VOICE="aura-asteria-en"
DG_API_KEY="your_deepgram_api_key"
# DG_TTS_MODEL_VOICE="aura-asteria-en"
# DG_API_KEY="your_deepgram_api_key"
# OpenAI configuration
OPENAI_API_KEY="your_openai_api_key"
OPENAI_TTS_MODEL="tts-1"
OPENAI_TTS_VOICE="alloy"
# OPENAI_API_KEY="your_openai_api_key"
# OPENAI_TTS_MODEL="tts-1"
# OPENAI_TTS_VOICE="alloy"
# CACHE_DIR="your_cache_directory_path"


# === Guardrails Proxy Configuration ===
AGENT_HOST="xrx-guardrails"
AGENT_PORT="8004"
GUARDRAILS_AGENT_HOST="xrx-reasoning"
GUARDRAILS_AGENT_PORT="8003"
# AGENT_HOST="xrx-guardrails"
# AGENT_PORT="8004"
# GUARDRAILS_AGENT_HOST="xrx-reasoning"
# GUARDRAILS_AGENT_PORT="8003"

# === LLM Observability Configuration ===
LLM_OBSERVABILITY_LIBRARY="none"
Expand Down
22 changes: 11 additions & 11 deletions wolfram-assistant-app/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ services:
networks:
- xrx_network

xrx-guardrails:
container_name: xrx-guardrails
build:
context: ./xrx-core/guardrails-proxy
dockerfile: Dockerfile
ports:
- 8004:8004
env_file:
- .env
networks:
- xrx_network
# xrx-guardrails:
# container_name: xrx-guardrails
# build:
# context: ./xrx-core/guardrails-proxy
# dockerfile: Dockerfile
# ports:
# - 8004:8004
# env_file:
# - .env
# networks:
# - xrx_network

xrx-redis:
image: "redis:alpine"
Expand Down
Loading

0 comments on commit ba51010

Please sign in to comment.