Fix: support cross language for API. (#8946)

### What problem does this PR solve?

Close #8943

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-07-21 17:25:28 +08:00
committed by GitHub
parent 7eb5ea3814
commit 0b487dee43
7 changed files with 17 additions and 4 deletions

View File

@ -128,7 +128,7 @@ class GraphExtractor(Extractor):
history.append({"role": "assistant", "content": response})
history.append({"role": "user", "content": LOOP_PROMPT})
async with chat_limiter:
continuation = await trio.to_thread.run_sync(lambda: self._chat("", history, {"temperature": 0.8}))
continuation = await trio.to_thread.run_sync(lambda: self._chat("", history))
token_count += num_tokens_from_string("\n".join([m["content"] for m in history]) + response)
if continuation != "Y":
break