Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2/3 examples don't seem to work #45

Closed
thorgexyz opened this issue May 16, 2023 · 3 comments · Fixed by #47
Closed

2/3 examples don't seem to work #45

thorgexyz opened this issue May 16, 2023 · 3 comments · Fixed by #47
Assignees
Labels
awaiting-response bug Something isn't working

Comments

@thorgexyz
Copy link

Scenario

  1. Downloading Repo
  2. Installing dependencies + adding .env file
  3. Starting demos according to examples/README.md

Actual result

✅ Conversation Chain
❌ Retrieval QA with Sources Chain
❌ Conversational Retrieval

Retrieval QA with Sources Chain:

thorge@Ts-MacBook-Air ~/w/f/examples (main)> uvicorn app.retrieval_
qa_chain:app --reload
INFO:     Will watch for changes in these directories: ['/Users/thorge/workdir/fastapi-async-langchain/examples']
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [4004] using WatchFiles
ERROR:    Error loading ASGI app. Could not import module "app.retrieval_qa_chain"

Conversational Retrieval starts, but only returns 'ConversationalRetrievalChain' in terminal and in the Gradio UI

thorge@Ts-MacBook-Air ~/w/fastapi-async-langchain (main)> curl -N -
X POST \
                                                              -H "A
ccept: text/event-stream" -H "Content-Type: application/json" \
                                                              -d '{
"query": "Give me list of text splitters available with code sample
s" }' \
                                                              http:
//localhost:8000/chat
'ConversationalRetrievalChain'⏎  
@thorgexyz thorgexyz added the bug Something isn't working label May 16, 2023
@ajndkr
Copy link
Owner

ajndkr commented May 16, 2023

Hi! I will check this out soon.

@thorgexyz
Copy link
Author

For Retrieval QA with Sources Chain, just the Readme command is wrong. Should be uvicorn app.retrieval_qa_w_sources:app --reload

@ajndkr
Copy link
Owner

ajndkr commented May 17, 2023

@thorgexyz will fix the README.

for Conversational Retrieval demo, you can try the following sample cURL request:

curl -N -X POST \
-H "Accept: text/event-stream" -H "Content-Type: application/json" \
-d '{
    "query": "Give me a code sample",
    "history": [
        [
            "What is a Text Splitter?",
            "Text Splitter is a module that is responsible for breaking up a document into smaller pieces, or chunks, that can be more easily processed."
        ],
        [
            "List all text splitter supported",
            "Langchain provides several different text splitters to help with processing text data. These include the Character Text Splitter, Hugging Face Length Function, Latex Text Splitter, Markdown Text Splitter, NLTK Text Splitter, Python Code Text Splitter, RecursiveCharacterTextSplitter, Spacy Text Splitter, tiktoken (OpenAI) Length Function, and TiktokenText Splitter."
        ]
    ]
}' \
http://localhost:8000/chat

I am already working on setting up project docs page. Will have it ready soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-response bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants