Comments (8)
I will look into this. If the performance is good, I will make it as default, otherwise will add a config option to enable this.
It will also solve #22
from chatdocs.
Looking forward to this @marella . Is this still on your to do?
from chatdocs.
Hi, yes. I was out of station with a slow internet for the past few days, so the progress has slowed down. I will start looking into the pending issues next week.
from chatdocs.
Hi, yes. I was out of station with a slow internet for the past few days, so the progress has slowed down. I will start looking into the pending issues next week.
Great to have you back @marella
from chatdocs.
@marella been trying to implement this function on my own. I think I might almost be there and have it functional. The problem is that I can't get it to remember the prompt, only the answer of the prompt so far. Let me know if you want to see my changes.
from chatdocs.
Great! Please share link to your repo/branch.
from chatdocs.
I did this @marella
Here is my chains.py:
from typing import Any, Callable, Dict, Optional
from langchain.chains import ConversationalRetrievalChain
from langchain.memory import ConversationBufferMemory
from .llms import get_llm
from .vectorstores import get_vectorstore
def get_retrieval_qa(
config: Dict[str, Any],
*,
callback: Optional[Callable[[str], None]] = None,
) -> ConversationalRetrievalChain:
db = get_vectorstore(config)
retriever = db.as_retriever(**config["retriever"])
llm = get_llm(config, callback=callback)
memory=ConversationBufferMemory(memory_key="chat_history", return_messages=True, input_key="question", output_key="answer")
return ConversationalRetrievalChain.from_llm(
llm=llm,
retriever=retriever,
return_source_documents=True,
memory=memory,
)
In Index.html I changed this:
answer.innerText = res.result; --> answer.innerText = res.answer;
In ui.py I changed this:
res["result"] = data["result"] --> res["answer"] = data["answer"]
from chatdocs.
It repeats the question before it gives an answer and then the repeated question is just removed
from chatdocs.
Related Issues (20)
- Can't download models anymore, not sure why. Used to work perfectly HOT 4
- Is chatdocs still being supported? HOT 1
- how to turn off citations? HOT 1
- `score_threshold` in db.as_retriever doesn't seem to be enforced HOT 1
- ModuleNotFoundError: No module named 'langchain.embeddings.base' HOT 1
- ImportError: cannot import name 'soft_unicode' from 'markupsafe' HOT 1
- pad_token errors
- Google colab: OSError: libcudart.so.12: cannot open shared object file: No such file or directory
- model DocsGPT-7B
- Error ImportError: cannot import name 'url_quote' from 'werkzeug.urls'after this command chatdocs ui HOT 1
- ui color change HOT 1
- HTTPS not working? Please help.
- In which path the add file will be loaded any how can we delete the loaded file ?
- Works only on one session at a time.
- Error ImportError: cannot import name 'url_quote' from 'werkzeug.urls' HOT 1
- Turning on GPU gives PTX error
- Tabulate missing as dependency
- Update to Python 3.12 - Remove 'stdlib distutils module' requirement (deprecated)
- French language support
- IndexError when using chatdocs add command for some documents
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatdocs.