Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
It seems `chatbot.query` was replaced with `chatbot.chat`, but the change wasn't reflected in the readme. see #255
In addition, a broken reference to `source.hostname` was removed.
  • Loading branch information
owlen authored Oct 7, 2024
1 parent 3efd043 commit c159fc9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,18 @@ file_list = message_result.get_files_created() # must call wait_until_done() fir
# tips: model "CohereForAI/c4ai-command-r-plus" can generate images :)

# Stream response
for resp in chatbot.query(
for resp in chatbot.chat(
"Hello",
stream=True
):
print(resp)

# Web search
query_result = chatbot.query("Hi!", web_search=True)
query_result = chatbot.chat("Hi!", web_search=True)
print(query_result)
for source in query_result.web_search_sources:
print(source.link)
print(source.title)
print(source.hostname)

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

0 comments on commit c159fc9

Please sign in to comment.