Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -694,6 +694,16 @@ def tavily_search(tavily_client, query):
|
|
694 |
search_result = tavily_client.get_search_context(query, search_depth="advanced", max_tokens=8000)
|
695 |
return search_result
|
696 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
697 |
########################################
|
698 |
# nicht in Gebrauch: Assistant für Websuche anlgen
|
699 |
def openai_assistant_suche(client):
|
|
|
694 |
search_result = tavily_client.get_search_context(query, search_depth="advanced", max_tokens=8000)
|
695 |
return search_result
|
696 |
|
697 |
+
########################################
|
698 |
+
# HuggingChat Search Machine
|
699 |
+
def hugchat_search(chatbot, query):
|
700 |
+
search_result = chatbot.query(query, web_search=True)
|
701 |
+
#for source in query_result.web_search_sources:
|
702 |
+
#print(source.link)
|
703 |
+
#print(source.title)
|
704 |
+
#print(source.hostname)
|
705 |
+
return search_result.text, search_result.link
|
706 |
+
|
707 |
########################################
|
708 |
# nicht in Gebrauch: Assistant für Websuche anlgen
|
709 |
def openai_assistant_suche(client):
|