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)
This commit is contained in:
Stephen Hu
2025-06-20 11:13:00 +08:00
committed by GitHub
parent 80f1f2723c
commit ef5e7d8c44

View File

@ -762,7 +762,7 @@ class SILICONFLOWEmbed(Base):
"input": text,
"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:
res = response.json()
return np.array(res["data"][0]["embedding"]), self.total_token_count(res)