Fixed typo

This commit is contained in:
Simone 2025-02-13 07:04:02 +01:00
parent 7dc000a6b9
commit b0ade6c04c

View File

@ -6,7 +6,7 @@ from open_webui.utils.misc import (
) )
def conver_ollama_tool_call_to_openai(tool_calls: dict) -> dict: def convert_ollama_tool_call_to_openai(tool_calls: dict) -> dict:
openai_tool_calls = [] openai_tool_calls = []
for tool_call in tool_calls: for tool_call in tool_calls:
openai_tool_call = { openai_tool_call = {
@ -30,7 +30,7 @@ def convert_response_ollama_to_openai(ollama_response: dict) -> dict:
openai_tool_calls = None openai_tool_calls = None
if tool_calls: if tool_calls:
openai_tool_calls = conver_ollama_tool_call_to_openai(tool_calls) openai_tool_calls = convert_ollama_tool_call_to_openai(tool_calls)
data = ollama_response data = ollama_response
usage = { usage = {
@ -87,7 +87,7 @@ async def convert_streaming_response_ollama_to_openai(ollama_streaming_response)
openai_tool_calls = None openai_tool_calls = None
if tool_calls: if tool_calls:
openai_tool_calls = conver_ollama_tool_call_to_openai(tool_calls) openai_tool_calls = convert_ollama_tool_call_to_openai(tool_calls)
done = data.get("done", False) done = data.get("done", False)