Skip to content

Search for a holiday and get destination advice from an LLM. Observability by Dynatrace.

License

Notifications You must be signed in to change notification settings

Dynatrace/obslab-llm-observability

 
 

Repository files navigation

EasyTravel Bedrock - Travel Advisor

Demo application for giving travel advice written in Python. Observability signals by OpenTelemetry.

Uses Amazon Bedrock to generate advice for a given destination.

Note This product is not officially supported by Dynatrace!

Try it yourself

Configure Bedrock

You can follow the Amazon Getting Started guide to get access to an Amazon Bedrock foundation model, or deploy your own custom model.

Try it out yourself

Open "RAG" version in GitHub Codespaces

Developer Information Below

Run Locally

You can start the application locally by running the following command.

export AWS_EMBEDDING_MODEL=<YOUR_AWS_BEDROCK_EMBEDDING_MODEL> 
export AWS_MODEL=<YOUR_AWS_BEDROCK_MODEL> 
export AWS_GUARDRAIL_ID=<OTIONAL_YOUR_AWS_BEDROCK_GUARDRAIL> 
export AWS_DEFAULT_REGION=<YOUR_AWS_REGION> 
export AWS_ACCESS_KEY_ID=<YOUR_AWS_KEY> 
export AWS_SECRET_ACCESS_KEY=<YOUR_AWS_SECRET> 
export OTEL_ENDPOINT=https://<YOUR_DT_TENANT>.live.dynatrace.com/api/v2/otlp
export API_TOKEN=<YOUR_DT_TOKEN>
python app.py

Deploy on a Local K8S Cluster

You will need Docker or Podman installed.

Create a cluster if you do not already have one:

kind create cluster --config .devcontainer/kind-cluster.yml --wait 300s

Customise and set some environment variables

export AWS_EMBEDDING_MODEL=<YOUR_AWS_BEDROCK_EMBEDDING_MODEL> 
export AWS_MODEL=<YOUR_AWS_BEDROCK_MODEL> 
export AWS_GUARDRAIL_ID=<OTIONAL_YOUR_AWS_BEDROCK_GUARDRAIL> 
export AWS_DEFAULT_REGION=<YOUR_AWS_REGION> 
export AWS_ACCESS_KEY_ID=<YOUR_AWS_KEY> 
export AWS_SECRET_ACCESS_KEY=<YOUR_AWS_SECRET>
export DT_ENDPOINT=https://<YOUR_DT_TENANT>.live.dynatrace.com
export DT_TOKEN=<YOUR_DT_TOKEN>

Run the deployment script:

.devcontainer/deployment.sh