Class: TurnKit::Store
- Inherits:
-
Object
show all
- Defined in:
- lib/turnkit/store.rb
Instance Method Summary
collapse
Instance Method Details
#append_message(_attributes) ⇒ Object
9
|
# File 'lib/turnkit/store.rb', line 9
def append_message(_attributes) = raise(NotImplementedError)
|
#claim_turn(id, from: "pending", to: "running", **attributes) ⇒ Object
15
16
17
18
19
20
|
# File 'lib/turnkit/store.rb', line 15
def claim_turn(id, from: "pending", to: "running", **attributes)
turn = load_turn(id)
return nil unless turn["status"] == from
update_turn(id, attributes.merge(status: to))
end
|
#create_conversation(_attributes) ⇒ Object
5
|
# File 'lib/turnkit/store.rb', line 5
def create_conversation(_attributes) = raise(NotImplementedError)
|
23
|
# File 'lib/turnkit/store.rb', line 23
def create_tool_execution(_attributes) = raise(NotImplementedError)
|
#create_turn(_attributes) ⇒ Object
12
|
# File 'lib/turnkit/store.rb', line 12
def create_turn(_attributes) = raise(NotImplementedError)
|
#find_stale_turns(before:) ⇒ Object
28
|
# File 'lib/turnkit/store.rb', line 28
def find_stale_turns(before:) = []
|
#list_messages(_conversation_id, through_sequence: nil, turn_id: nil) ⇒ Object
10
|
# File 'lib/turnkit/store.rb', line 10
def list_messages(_conversation_id, through_sequence: nil, turn_id: nil) = raise(NotImplementedError)
|
26
|
# File 'lib/turnkit/store.rb', line 26
def list_tool_executions(turn_id:) = raise(NotImplementedError)
|
#list_turns(root_turn_id: nil, conversation_id: nil, agent_name: nil) ⇒ Object
21
|
# File 'lib/turnkit/store.rb', line 21
def list_turns(root_turn_id: nil, conversation_id: nil, agent_name: nil) = raise(NotImplementedError)
|
#load_conversation(_id) ⇒ Object
6
|
# File 'lib/turnkit/store.rb', line 6
def load_conversation(_id) = raise(NotImplementedError)
|
24
|
# File 'lib/turnkit/store.rb', line 24
def load_tool_execution(_id) = raise(NotImplementedError)
|
#load_turn(_id) ⇒ Object
13
|
# File 'lib/turnkit/store.rb', line 13
def load_turn(_id) = raise(NotImplementedError)
|
#next_message_sequence(_conversation_id) ⇒ Object
8
|
# File 'lib/turnkit/store.rb', line 8
def next_message_sequence(_conversation_id) = raise(NotImplementedError)
|
25
|
# File 'lib/turnkit/store.rb', line 25
def update_tool_execution(_id, _attributes) = raise(NotImplementedError)
|
#update_turn(_id, _attributes) ⇒ Object
14
|
# File 'lib/turnkit/store.rb', line 14
def update_turn(_id, _attributes) = raise(NotImplementedError)
|