I'm unable to use the pdf_bot using AWS claudev2

Open
#145 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
aws, docker-compose, neo4j, python

Research direction

Start with pdf_bot.py at lines 72 and 95, then inspect the AWS and embedding configuration used by the Neo4jVector call. Reproduce the PDF bot with the reported .env values and review the Windows docker-compose.yml changes mentioned in the issue. Done means the app can invoke the configured embedding model without the AccessDeniedException.

Written by the indexing model from the issue text.

Description

ValueError: Error raised by inference endpoint: An error occurred (AccessDeniedException) when calling the InvokeModel operation: You don't have access to the model with the specified model ID

File "/usr/local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
exec(code, module.dict)
File "/app/pdf_bot.py", line 95, in
main()
File "/app/pdf_bot.py", line 72, in main
vectorstore = Neo4jVector.from_texts(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/langchain_community/vectorstores/neo4j_vector.py", line 679, in from_texts
embeddings = embedding.embed_documents(list(texts))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/langchain_community/embeddings/bedrock.py", line 169, in embed_documents
response = self._embedding_func(text)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/langchain_community/embeddings/bedrock.py", line 150, in _embedding_func
raise ValueError(f"Error raised by inference endpoint: {e}")

I'm facing this error when I'm running the pdf_bot app. I've got the access to the claudev2 model from AWS still it's showing the above mentioned error.

[P.S I'm using Windows, and as discussed in #123 I've made some changes in my docker-compose.yml]

Here's the copy of the .env file -

OLLAMA_BASE_URL=http://host.docker.internal:11434
NEO4J_URI=neo4j://database:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=password
LLM=claudev2
EMBEDDING_MODEL=aws
AWS_ACCESS_KEY_ID=[I've have provided it but I can't share this]
AWS_SECRET_ACCESS_KEY=[I've have provided it but I can't share this]
AWS_DEFAULT_REGION=us-east-1

image

Dominant language
Python
Stars
5.4k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from docker/genai-stack

All issues in docker/genai-stack

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.