This commit is contained in:
2025-12-28 11:58:39 +08:00
parent 1d86109d64
commit 0f149027d9
6 changed files with 285 additions and 0 deletions
+34
View File
@@ -8,3 +8,37 @@ LLM = ChatOllama(model='qwen2.5:14b', api_key="1145141919810", base_url='http://
tavily_key = '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'
gaode_key = '00fd082df2414f75c6efb64896819451'
#
#
# import requests
#
# url = 'http://192.168.195.158:61000/LLMProcessStream'
# json = {
# "conversation_id": "49fcf90889cb5538d6171cc5043537cd",
# "model": "qwen2.5:14b",
# "user_input": "Good day",
# "require_voice": False,
# "rag": False
# }
#
# headers = {'Authorization': '9a504ac370734c811d107b2f634185b0', 'user': "armor"}
# response = requests.post(url, json=json, headers=headers, stream=True)
#
# result_str = ''
# flag = True
# for i in response:
# target = i.decode('utf-8')
# if '<1json2>' not in target:
# pass
# else:
# flag = False
# if flag:
# print(target, end='')
# if not flag:
# result_str += target
# result_str = result_str.replace('<1json2>', '')
# print('')
# print(result_str)