mirror of
https://github.com/ollama/ollama-python.git
synced 2026-11-02 22:02:51 +00:00
Update ollama/_types.py
Co-authored-by: Parth Sareen <[email protected]>
This commit is contained in:
co-authored by
Parth Sareen
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user