Git Product home page Git Product logo

Comments (2)

anth0nyhak1m avatar anth0nyhak1m commented on September 14, 2024

The way I fixed this is by removing the temperature parameter. However, somehow, somewhere in the pipeline, the instantiation of the bedrock model turns into a string, and I get an error about 'str' object has no attribute .invoke_model.

I will fix this next and raise an issue about it.

from scrapegraph-ai.

anth0nyhak1m avatar anth0nyhak1m commented on September 14, 2024

Okay, here is the problem.

In this chunk of code:

graph_config = {
"llm": {
"client": "client_name",
"model": "bedrock/anthropic.claude-3-sonnet-20240229-v1:0"
}
}

"client" needs to map to a boto3 instance of bedrock client. The langchain library for aws has the method init_chat_model(), which will not throw an error if you pass in a string for the client, but it will throw an error when trying to use llm_model.generate_prompt() saying that "AttributeError: 'str' object has no attribute 'to_messages'"

I am going to keep going down this rabbit hole to see if I can solve this and continue reporting on this thread.

Edit: Unfortunately, this is incorrect, and instantiating "client_name" as the actual instance of the boto3 bedrock client did not fix it. I would appreciate documentation on what client name is.

from scrapegraph-ai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.