Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbdias committed Sep 29, 2024
1 parent e6232f6 commit 8287ca8
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 21 deletions.
13 changes: 10 additions & 3 deletions examples/quick-start-llm-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ python -m venv ./_venv
source _venv/bin/activate

# install requirements
pip install -r app/requirements.llm.txt
pip install -r app/requirements.telemetry.txt
pip install -r app/requirements.app.txt
pip install -r app/requirements.txt

# install OTel auto-instrumentation
opentelemetry-bootstrap -a install
Expand All @@ -36,13 +34,22 @@ echo "GOOGLE_API_KEY={your-google-gemini-api-key}" >> .env
# add tracetest agent keys
echo "TRACETEST_API_KEY={your-tracetest-api-key}" >> .env
echo "TRACETEST_ENVIRONMENT_ID={your-tracetest-env-id}" >> .env

# add tracetest token for playwright tests with TS lib
echo "TRACETEST_API_TOKEN={your-tracetest-token-for-ts-libs}" >> ./tests/.env
```

#### Running the apps

```bash

# start the app running the UI locally
make start/local-ui

# start the app running the API locally
make start/local-api

# start the app everything on docker
make start/on-docker

```
6 changes: 2 additions & 4 deletions examples/quick-start-llm-python/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM python:3.12.4-slim

WORKDIR /opt/app
COPY requirements.*.txt ./
COPY requirements.txt ./

RUN pip install --no-cache-dir -r requirements.llm.txt
RUN pip install --no-cache-dir -r requirements.app.txt
RUN pip install --no-cache-dir -r requirements.telemetry.txt
RUN pip install --no-cache-dir -r requirements.txt
RUN opentelemetry-bootstrap -a install

COPY . .
3 changes: 0 additions & 3 deletions examples/quick-start-llm-python/app/requirements.app.txt

This file was deleted.

4 changes: 0 additions & 4 deletions examples/quick-start-llm-python/app/requirements.llm.txt

This file was deleted.

This file was deleted.

11 changes: 11 additions & 0 deletions examples/quick-start-llm-python/app/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
flask==3.0.3
langchain-community==0.2.16
langchain-google-genai==1.0.10
langchain-openai==0.1.24
langchain==0.2.16
opentelemetry-distro==0.48b0
opentelemetry-exporter-otlp-proto-grpc==1.27.0
opentelemetry-exporter-otlp==1.27.0
python-dotenv==1.0.1
streamlit==1.38.0
traceloop-sdk==0.30.0
3 changes: 0 additions & 3 deletions examples/quick-start-llm-python/example.txt

This file was deleted.

0 comments on commit 8287ca8

Please sign in to comment.