mirror of
https://github.com/BoardWare-Genius/jarvis-models.git
synced 2025-12-13 16:53:24 +00:00
feat: chat2tts stream
This commit is contained in:
@ -85,7 +85,7 @@ ids = ["20240521_store"+str(i) for i in range(len(docs))]
|
||||
|
||||
# 加载embedding模型和chroma server
|
||||
embedding_model = SentenceTransformerEmbeddings(model_name='/Workspace/Models/BAAI/bge-large-zh-v1.5', model_kwargs={"device": "cuda"})
|
||||
client = chromadb.HttpClient(host='192.168.0.200', port=7000)
|
||||
client = chromadb.HttpClient(host='10.6.44.141', port=7000)
|
||||
|
||||
id = "g2e"
|
||||
#client.delete_collection(id)
|
||||
@ -107,7 +107,7 @@ print("collection_number",collection_number)
|
||||
# # chroma 召回
|
||||
# from chromadb.utils import embedding_functions
|
||||
# embedding_model = embedding_functions.SentenceTransformerEmbeddingFunction(model_name="/Workspace/Models/BAAI/bge-large-zh-v1.5", device = "cuda")
|
||||
# client = chromadb.HttpClient(host='192.168.0.200', port=7000)
|
||||
# client = chromadb.HttpClient(host='10.6.44.141', port=7000)
|
||||
# collection = client.get_collection("g2e", embedding_function=embedding_model)
|
||||
|
||||
# print(collection.count())
|
||||
@ -152,7 +152,7 @@ print("collection_number",collection_number)
|
||||
# 'Content-Type': 'application/json',
|
||||
# 'Authorization': "Bearer " + key
|
||||
# }
|
||||
# url = "http://192.168.0.200:23333/v1/chat/completions"
|
||||
# url = "http://10.6.44.141:23333/v1/chat/completions"
|
||||
|
||||
# fastchat_response = requests.post(url, json=chat_inputs, headers=header)
|
||||
# # print(fastchat_response.json())
|
||||
|
||||
Reference in New Issue
Block a user