Azure-Samples / Azure-Samples/azure-sql-db-rag-langchain-chainlit

RAG Chain fails with TypeError

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TSQL
Stars
35
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Hi

I have just copied your code in a notebook and tried to run as-is for a quick test.

However, this line fails to run:

`rag_chain = {"sessions": retriever, "question": RunnablePassthrough()} | prompt | llm`

with the following error:
```
TypeError: Expected a Runnable, callable or dict.Instead got an unsupported type:
```

As there is no version pinning in the `requirements.txt` file, I am curious if you can repro this same error with the latest version of langchain, or comment on which version works for you. Thanks.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the notebook example containing the failing rag_chain expression and inspect requirements.txt, which currently has no version pinning. Reproduce the TypeError with the latest LangChain version, then determine and document the compatible version or dependency change needed for the example to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, sql
Domain
ai, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.