浏览代码

Fix:embedding_model class SILICONFLOWEmbed(Base)Function reusing json (#8378)

### What problem does this PR solve?

https://github.com/infiniflow/ragflow/issues/8360

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.19.1
Stephen Hu 4 个月前
父节点
当前提交
ef5e7d8c44
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      rag/llm/embedding_model.py

+ 1
- 1
rag/llm/embedding_model.py 查看文件

"input": text, "input": text,
"encoding_format": "float", "encoding_format": "float",
} }
response = requests.post(self.base_url, json=payload, headers=self.headers).json()
response = requests.post(self.base_url, json=payload, headers=self.headers)
try: try:
res = response.json() res = response.json()
return np.array(res["data"][0]["embedding"]), self.total_token_count(res) return np.array(res["data"][0]["embedding"]), self.total_token_count(res)

正在加载...
取消
保存