mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-23 20:21:03 +02:00
Update tests
This commit is contained in:
parent
04f870ee2a
commit
63f41cff1a
1 changed files with 7 additions and 4 deletions
|
|
@ -47,8 +47,9 @@ Args: {
|
||||||
"}"
|
"}"
|
||||||
]
|
]
|
||||||
|
|
||||||
for chunk in chunks:
|
for i, chunk in enumerate(chunks):
|
||||||
await chunk_callback(chunk)
|
is_final = (i == len(chunks) - 1)
|
||||||
|
await chunk_callback(chunk, is_final)
|
||||||
|
|
||||||
return full_text
|
return full_text
|
||||||
else:
|
else:
|
||||||
|
|
@ -312,8 +313,10 @@ Final Answer: AI is the simulation of human intelligence in machines."""
|
||||||
call_count += 1
|
call_count += 1
|
||||||
|
|
||||||
if streaming and chunk_callback:
|
if streaming and chunk_callback:
|
||||||
for chunk in response.split():
|
chunks = response.split()
|
||||||
await chunk_callback(chunk + " ")
|
for i, chunk in enumerate(chunks):
|
||||||
|
is_final = (i == len(chunks) - 1)
|
||||||
|
await chunk_callback(chunk + " ", is_final)
|
||||||
return response
|
return response
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue