Skip to content

Commit

Permalink
temporarily explicitly initialize client
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
codefromthecrypt committed Jan 15, 2025
1 parent 670f267 commit 743afa8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 2 additions & 0 deletions example-apps/chatbot-rag-app/api/llm_integrations.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os

import boto3
from langchain_aws import ChatBedrock
from langchain_cohere import ChatCohere
from langchain_google_vertexai import ChatVertexAI
Expand Down Expand Up @@ -41,6 +42,7 @@ def init_bedrock(temperature):

AWSBedrockInstrumentation().instrument()
return ChatBedrock(
client=boto3.client("bedrock-runtime"),
model_id=os.getenv("CHAT_MODEL"),
streaming=True,
model_kwargs={"temperature": temperature},
Expand Down
23 changes: 11 additions & 12 deletions example-apps/chatbot-rag-app/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ attrs==24.3.0
# via aiohttp
blinker==1.9.0
# via flask
boto3==1.35.98
boto3==1.35.99
# via langchain-aws
botocore==1.35.98
botocore==1.35.99
# via
# boto3
# s3transfer
Expand All @@ -41,7 +41,7 @@ charset-normalizer==3.4.1
# via requests
click==8.1.8
# via flask
cohere==5.13.6
cohere==5.13.8
# via langchain-cohere
colorama==0.4.6
# via langtrace-python-sdk
Expand All @@ -57,7 +57,7 @@ distro==1.9.0
# via openai
docstring-parser==0.16
# via google-cloud-aiplatform
elastic-opentelemetry==0.6.0
elastic-opentelemetry==0.6.1
# via -r requirements.in
elastic-transport==8.17.0
# via elasticsearch
Expand Down Expand Up @@ -144,7 +144,7 @@ h11==0.14.0
# via httpcore
httpcore==1.0.7
# via httpx
httpx==0.27.2
httpx==0.28.1
# via
# cohere
# langchain-google-vertexai
Expand Down Expand Up @@ -209,7 +209,7 @@ langchain-elasticsearch==0.3.0
# via -r requirements.in
langchain-experimental==0.3.4
# via langchain-cohere
langchain-google-vertexai==2.0.10
langchain-google-vertexai==2.0.11
# via -r requirements.in
langchain-mistralai==0.2.4
# via -r requirements.in
Expand All @@ -222,7 +222,7 @@ langsmith==0.2.10
# langchain
# langchain-community
# langchain-core
langtrace-python-sdk==3.3.23
langtrace-python-sdk==3.3.24
# via -r requirements.in
markupsafe==3.0.2
# via
Expand Down Expand Up @@ -290,7 +290,7 @@ opentelemetry-proto==1.29.0
# opentelemetry-exporter-otlp-proto-http
opentelemetry-resource-detector-azure==0.1.5
# via elastic-opentelemetry
opentelemetry-resourcedetector-gcp==1.7.0a0
opentelemetry-resourcedetector-gcp==1.8.0a0
# via elastic-opentelemetry
opentelemetry-sdk==1.29.0
# via
Expand All @@ -301,7 +301,7 @@ opentelemetry-sdk==1.29.0
# opentelemetry-resource-detector-azure
# opentelemetry-resourcedetector-gcp
# opentelemetry-sdk-extension-aws
opentelemetry-sdk-extension-aws==2.0.2
opentelemetry-sdk-extension-aws==2.1.0
# via elastic-opentelemetry
opentelemetry-semantic-conventions==0.50b0
# via
Expand Down Expand Up @@ -416,7 +416,7 @@ s3transfer==0.10.4
# via boto3
safetensors==0.5.2
# via transformers
sentry-sdk==2.19.2
sentry-sdk==2.20.0
# via langtrace-python-sdk
shapely==2.0.6
# via google-cloud-aiplatform
Expand All @@ -427,7 +427,6 @@ six==1.17.0
sniffio==1.3.1
# via
# anyio
# httpx
# openai
sqlalchemy==2.0.37
# via
Expand Down Expand Up @@ -491,7 +490,7 @@ urllib3==2.3.0
# types-requests
werkzeug==3.1.3
# via flask
wrapt==1.17.1
wrapt==1.17.2
# via
# deprecated
# opentelemetry-instrumentation
Expand Down

0 comments on commit 743afa8

Please sign in to comment.