mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
if "function_call" find name
This commit is contained in:
parent
d2bdfecd96
commit
404af1be0f
5 changed files with 272 additions and 2 deletions
|
@ -1158,6 +1158,10 @@ def stream_chunk_builder(chunks: list):
|
|||
# Extract the "content" strings from the nested dictionaries within "choices"
|
||||
content_list = []
|
||||
|
||||
if "function_call" in chunks[0]["choices"][0]["delta"]:
|
||||
function_call_name = chunks[0]["choices"][0]["delta"]["function_call"]["name"]
|
||||
print(function_call_name)
|
||||
|
||||
for chunk in chunks:
|
||||
choices = chunk["choices"]
|
||||
for choice in choices:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue