Git Product home page Git Product logo

Comments (8)

eolivelli avatar eolivelli commented on July 23, 2024

do you have more logs ? it seems an error in the python runtime.

from langstream.

devinbost avatar devinbost commented on July 23, 2024

After upgrading to Langstream 0.4.3, I get slightly different behavior. Now, it just seems to do nothing when I send a message through the UI. Here are the logs:

langstream_rag_logs.log

The code to reproduce it is here: https://github.com/devinbost/langstream/tree/azure-chatbot/examples/applications/azure-document-ingestion
(The readme is outdated.)

from langstream.

cbornet avatar cbornet commented on July 23, 2024

Missing some input keys is a langchain error.
The logs could be better to explain where the error comes from. We lose some error context during the translation from Python to Java (eg. the python stack trace).
Do you have unit tests ? It would help you to debug locally.

from langstream.

cbornet avatar cbornet commented on July 23, 2024

I think this comes from the prompt template. Since you didn't specify one, it's probably picking a default one but I don't know which one.
You don't put a prompt template in the chain so the first step is the retriever that takes a query parameter as input.

from langstream.

cbornet avatar cbornet commented on July 23, 2024

See https://python.langchain.com/docs/use_cases/question_answering/vector_db_qa
The param is indeed named query for the retriever

from langstream.

devinbost avatar devinbost commented on July 23, 2024

@cbornet You're absolutely right that was a LangChain issue. I remember now that I ran into this issue with LangChain once before when I tried adding conversational memory to a Q&A chain. It didn't cross my mind because the stack trace threw me off. I applied a change that fixed the issue in a previous project. However, due to the issue below, I can't determine if the change fixed the issue or not.

After I upgraded to Langstream 0.4.3, I'm not getting any logs when I send a message through the UI. What should I check next?

from langstream.

devinbost avatar devinbost commented on July 23, 2024

Here's a thread dump:

langstream_jstack.log

from langstream.

devinbost avatar devinbost commented on July 23, 2024

I found the issue. This was a clue:

17:39:16.394 [ws-consume-1] WARN o.a.k.c.c.i.ConsumerCoordinator -- [Consumer clientId=consumer--1, groupId=] Offset commit failed on partition answers-topic-0 at offset 0: This is not the correct coordinator.

I checked the pipeline.yaml input and output topics, and somehow I had inadvertently deleted the input line from the pipeline config.
After setting it back to "questions-topic", it started working as desired.

For anyone else reading this, the fix was to replace:

 response = self.answer_chain.invoke({
             "question": question,
             "chat_history": []
         })

with:

response = self.answer_chain.run(question)

To implement conversational history, a conversational chain should be used instead, like ConversationalRetrievalChain.

from langstream.

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.