mirror of
https://github.com/ollama/ollama-python.git
synced 2026-01-13 21:57:16 +08:00
include tool calls
This commit is contained in:
parent
1a15742705
commit
98b3a44b14
@ -109,6 +109,7 @@ class Client(BaseClient):
|
||||
raw: bool = False,
|
||||
format: Literal['', 'json'] = '',
|
||||
images: Optional[Sequence[AnyStr]] = None,
|
||||
tools: Optional[Sequence[Any]] = None,
|
||||
options: Optional[Options] = None,
|
||||
keep_alive: Optional[Union[float, str]] = None,
|
||||
) -> Mapping[str, Any]: ...
|
||||
@ -125,6 +126,7 @@ class Client(BaseClient):
|
||||
raw: bool = False,
|
||||
format: Literal['', 'json'] = '',
|
||||
images: Optional[Sequence[AnyStr]] = None,
|
||||
tools: Optional[Sequence[Any]] = None,
|
||||
options: Optional[Options] = None,
|
||||
keep_alive: Optional[Union[float, str]] = None,
|
||||
) -> Iterator[Mapping[str, Any]]: ...
|
||||
@ -140,6 +142,7 @@ class Client(BaseClient):
|
||||
raw: bool = False,
|
||||
format: Literal['', 'json'] = '',
|
||||
images: Optional[Sequence[AnyStr]] = None,
|
||||
tools: Optional[Sequence[Any]] = None,
|
||||
options: Optional[Options] = None,
|
||||
keep_alive: Optional[Union[float, str]] = None,
|
||||
) -> Union[Mapping[str, Any], Iterator[Mapping[str, Any]]]:
|
||||
@ -168,6 +171,7 @@ class Client(BaseClient):
|
||||
'stream': stream,
|
||||
'raw': raw,
|
||||
'images': [_encode_image(image) for image in images or []],
|
||||
'tools': tools or [],
|
||||
'format': format,
|
||||
'options': options or {},
|
||||
'keep_alive': keep_alive,
|
||||
|
||||
@ -52,6 +52,8 @@ class GenerateResponse(BaseGenerateResponse):
|
||||
context: Sequence[int]
|
||||
'Tokenized history up to the point of the response.'
|
||||
|
||||
tool_calls: Sequence[Any]
|
||||
'List of tool calls made by the model.'
|
||||
|
||||
class Message(TypedDict):
|
||||
"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user