mirror of
https://github.com/ollama/ollama-python.git
synced 2026-01-13 21:57:16 +08:00
Update ollama/_types.py
Co-authored-by: Parth Sareen <parth.sareen@ollama.com>
This commit is contained in:
parent
2095fc9107
commit
ea0e0dc692
@ -40,6 +40,11 @@ class SubscriptableBaseModel(BaseModel):
|
||||
>>> msg['role'] = 'assistant'
|
||||
>>> msg['role']
|
||||
'assistant'
|
||||
>>> tool_call = Message.ToolCall(function=Message.ToolCall.Function(name='foo', arguments={}))
|
||||
>>> msg = Message(role='user', content='hello')
|
||||
>>> msg['tool_calls'] = [tool_call]
|
||||
>>> msg['tool_calls'][0]['function']['name']
|
||||
'foo'
|
||||
"""
|
||||
setattr(self, key, value)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user