Comments (3)
I believe you need to pass region_name
directly into ChatBedrockConverse
- or set the environment variable AWS_DEFAULT_REGION
. boto3 and langchain_aws don't share variables, so you must specify the region name for the llm as well I believe. Let me know if that fixes your error.
from langchain-aws.
I believe you need to pass
region_name
directly intoChatBedrockConverse
- or set the environment variableAWS_DEFAULT_REGION
. boto3 and langchain_aws don't share variables, so you must specify the region name for the llm as well I believe. Let me know if that fixes your error.
Yes, setting region_name
and credentials_profile_name
in the ChatBedrockConverse constructor works.
Looking in the code of validate_environment
in bedrock_converse.py
, I see that a new boto3.Session
object is being instantiated, and later, with that new session, the bedrock-runtime
client is then created. Wouldn't it be better to just call boto3.client('bedrock-runtime')
directly (or at least when no credentials_profile_name
was provided) ? That way it will work with boto3.setup_default_session
out of the box.
from langchain-aws.
Not a boto3
expert by any means - but if I understand correctly the code currently creates its own session, but you would like it to work with the session already setup? That sounds reasonable to me - if you want to open up a PR (with a corresponding test case) I would be happy to review. Lmk if I misunderstood
from langchain-aws.
Related Issues (20)
- langchain-aws has not working with some of the Bedrock Cohere and Amazon model HOT 11
- [Question] RetryWithErrorOutputParser with_structured_output
- ValueError: Model anthropic.claude-3-haiku-20240307-v1:0 does not currently support tool_choice.
- Provider ai21 model does not support chat.
- Tool calling does not work with LLama3.1 HOT 11
- Sagemaker TGI MESSAGES_API_ENABLED support
- Using SagemakerEndpoint together with RunnableWithMessageHistory with custom prompt template creates broken prompt
- Bedrock Knowledge Base Search Filter "in" broken HOT 2
- ChatBedrockConverse and Llama 3.1 tool calling not working. Generates text instead of tool_call HOT 10
- Create agent with tools or Bind_tools does not implement the correct chain with Llama models in Bedrock
- ChatBedrock doesn't support streaming when Bedrock guardrails are applied HOT 2
- Cross-region support for Bedrock HOT 5
- with_structured_output not working for Llama 3.1 models + converse HOT 6
- Provider eu model does not support chat. HOT 2
- `ChatBedrockConverse` and `with_structured_output` not working with `claude-3-sonnet` HOT 1
- Regression after upgrading to langchain-aws==0.1.17 HOT 2
- Bedrock Inference Model IDs are out of support.
- Support max_parallel_api_rate to call InvokeModel API parallelly to shorten the embedding time
- ValidationException: A conversation must alternate between user and assistant roles. Make sure the conversation alternates between user and assistant roles and try again.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langchain-aws.