Giter Club home page Giter Club logo

Comments (5)

kobrinartem avatar kobrinartem commented on May 27, 2024

tested on us-west-2:

weaviate-aws-weaviate-1 | {"action":"requests_total","api":"rest","class_name":"Article","error":"update vector: send POST request: send POST request: Post "https://bedrock-runtime.us-west-2.amazonaws.com/model/cohere.embed-multilingual-v3/invoke\": context canceled","level":"error","msg":"unexpected error","query_type":"objects","time":"2023-12-22T12:55:40Z"}

from weaviate.

kobrinartem avatar kobrinartem commented on May 27, 2024

when I tried cloud version I got another error:

uuid = client.data_object.create(
    class_name="Article",
    data_object={
            "title": "test",
            "body": "test content",
        }
)

File .venv/lib/python3.11/site-packages/requests/models.py:975, in Response.json(self, **kwargs)
971 return complexjson.loads(self.text, **kwargs)
972 except JSONDecodeError as e:
973 # Catch JSON-related errors and raise as requests.JSONDecodeError
974 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
--> 975 raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

JSONDecodeError: Expecting value: line 2 column 1 (char 1)

from weaviate.

sandeepchandra avatar sandeepchandra commented on May 27, 2024

I encountered a similar challenge while attempting to generate embeddings using the AWS Bedrock model - amazon.titan-embed-text-v1. Utilizing a Docker setup with the image semitechnologies/weaviate:1.23.9, I aimed to add batch objects to the weaviate vector database. But ended up with read timeouts and invalid bedrock API URL (which doesn't have 'bedrock-runtime' in the domain) as above.

To resolve the issue, I conducted an investigation into the code of the Weaviate repository (master branch). It appears that within the codebase, there exists a conditional statement that distinguishes the URL creation for model IDs beginning with 'cohere' and 'amazon'. A snippet of this code is depicted below:

image

Having identified this condition, I proceeded to remove it, thereby allowing for the creation of the service name regardless of the model ID. Subsequently, I rebuilt the Docker image and applied it within my use-case, resulting in the desired outcomes.

from weaviate.

bbeaumatin avatar bbeaumatin commented on May 27, 2024

Hello, bumping this a little bit. There is indeed a bug here preventing from using the titan embedding model, as the URL is supposed to start with "bedrock-runtime" and given this condition in the code shown by @sandeepchandra it is not possible to build the URL properly, then the vectorization doesn't work. I'm not much of a Go developer but if needed I can propose a PR. Let me know if it's needed or if I misunderstood the configuration to do to have the titan model working, considering the doc states it's compatible:

image

Thanks!

from weaviate.

IzioDev avatar IzioDev commented on May 27, 2024

URL should be : https://bedrock-runtime.${REGION}.amazonaws.com/model/${MODEL_ID}/invoke for Bedrock service

from weaviate.

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.