web search results giving buggy response
Describe the bug The model is working fine, but not when the web search is enabled. until the web_search is enabled false or not mentioned the response is coming, but the point when the web search is enabled the response is buggy. It probably throws a bunch of tokens though I am not a expertise of this field so I cannot say how the response it gives.
Issue Code
assistant = chatbot.search_assistant(assistant_name="Real Human")
chatbot.new_conversation(assistant=assistant, switch_to=True)
query_result = chatbot.query("hi", web_search=True)
print(query_result)
Expected behavior It should give response like : "Hello! How are you feeling today?" as it gives response when web_search=False
Screenshots
Hi! Thanks for your issue, we will deal with your issue as soon as possible.
Hello there I may be doing a report again but i might have spotted the error line
in the following snippet the "hostname"
# wss.hostname = source["hostname"]
it is the line providing the error, now i have manually commented the code and the web search facility is working, as you are the creator you may be able to comlplete the error in a dynamic way and how it should be
THANK YOU for support ❤❤
Hi,
I confirm the issue mentioned in the latest message. Upon analyzing the returned JSON, it's clear that the hostname property no longer exists. Here's an example of the returned JSON object:
{
"title": "M-theory",
"link": "https://en.wikipedia.org/wiki/M-theory",
"snippet": "A theory of strings that incorporates the idea of supersymmetry is called a superstring theory. There are several different versions of superstring theory ...",
"position": 1
// other properties...
}
As you can see, there is no hostname property, which explains the error. Thank you for the proposed fix.
Committed fix can be reviewed here: https://github.com/Soulter/hugging-chat-api/compare/master...TribSTox:hugging-chat-api:patch-1
Best regards,
I hope this PR will be merged.
Hi,
I confirm the issue mentioned in the latest message. Upon analyzing the returned JSON, it's clear that the
hostnameproperty no longer exists. Here's an example of the returned JSON object:{ "title": "M-theory", "link": "https://en.wikipedia.org/wiki/M-theory", "snippet": "A theory of strings that incorporates the idea of supersymmetry is called a superstring theory. There are several different versions of superstring theory ...", "position": 1 // other properties... }As you can see, there is no
hostnameproperty, which explains the error. Thank you for the proposed fix.Committed fix can be reviewed here: master...TribSTox:hugging-chat-api:patch-1
Best regards,
Thanks you for your feedback, there was hostname property before, it should be huggingface deleted it. You can create a PR and I'll merge it.
Hi, I have created the PR as recommended.
Best regards,
Hi, I have created the PR as recommended.
Best regards,
Hello, I have merged the PR and released a new version. Thanks.
You can use pip install -U hugchat to update.