Skip to content

Commit 228543d

Browse files
authored
Update README.md
It seems `chatbot.query` was replaced with `chatbot.chat`, but the change wasn't reflected in the readme. see Soulter/hugging-chat-api#255 In addition, a broken reference to `source.hostname` was removed.
1 parent 14c45d2 commit 228543d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,18 @@ file_list = message_result.get_files_created() # must call wait_until_done() fir
5555
# tips: model "CohereForAI/c4ai-command-r-plus" can generate images :)
5656

5757
# Stream response
58-
for resp in chatbot.query(
58+
for resp in chatbot.chat(
5959
"Hello",
6060
stream=True
6161
):
6262
print(resp)
6363

6464
# Web search
65-
query_result = chatbot.query("Hi!", web_search=True)
65+
query_result = chatbot.chat("Hi!", web_search=True)
6666
print(query_result)
6767
for source in query_result.web_search_sources:
6868
print(source.link)
6969
print(source.title)
70-
print(source.hostname)
7170

7271
# Create a new conversation
7372
chatbot.new_conversation(switch_to = True) # switch to the new conversation

0 commit comments

Comments
 (0)