Class: TurnKit::Store
- Inherits:
-
Object
show all
- Defined in:
- lib/turnkit/store.rb
Instance Method Summary
collapse
-
#append_message(_attributes) ⇒ Object
-
#claim_turn(_id, from: "pending", to: "running", **_attributes) ⇒ Object
claim_turn is the concurrency-safety point: it must atomically compare-and-set status from from to to (returning nil when the turn is not in from), so concurrent workers cannot both claim a turn.
-
#create_conversation(_attributes) ⇒ Object
-
#create_tool_execution(_attributes) ⇒ Object
-
#create_turn(_attributes) ⇒ Object
-
#find_stale_turns(before:) ⇒ Object
-
#list_messages(_conversation_id, through_sequence: nil, turn_id: nil) ⇒ Object
-
#list_tool_executions(turn_id:) ⇒ Object
-
#list_turns(root_turn_id: nil, conversation_id: nil, agent_name: nil) ⇒ Object
-
#load_conversation(_id) ⇒ Object
-
#load_tool_execution(_id) ⇒ Object
-
#load_turn(_id) ⇒ Object
-
#next_message_sequence(_conversation_id) ⇒ Object
-
#update_tool_execution(_id, _attributes) ⇒ Object
-
#update_turn(_id, _attributes) ⇒ Object
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
claim_turn is the concurrency-safety point: it must atomically
compare-and-set status from from to to (returning nil when the turn
is not in from), so concurrent workers cannot both claim a turn.
18
|
# File 'lib/turnkit/store.rb', line 18
def claim_turn(_id, from: "pending", to: "running", **_attributes) = raise(NotImplementedError)
|
#create_conversation(_attributes) ⇒ Object
5
|
# File 'lib/turnkit/store.rb', line 5
def create_conversation(_attributes) = raise(NotImplementedError)
|
21
|
# File 'lib/turnkit/store.rb', line 21
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
26
|
# File 'lib/turnkit/store.rb', line 26
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)
|
24
|
# File 'lib/turnkit/store.rb', line 24
def list_tool_executions(turn_id:) = raise(NotImplementedError)
|
#list_turns(root_turn_id: nil, conversation_id: nil, agent_name: nil) ⇒ Object
19
|
# File 'lib/turnkit/store.rb', line 19
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)
|
22
|
# File 'lib/turnkit/store.rb', line 22
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)
|
23
|
# File 'lib/turnkit/store.rb', line 23
def update_tool_execution(_id, _attributes) = raise(NotImplementedError)
|
#update_turn(_id, _attributes) ⇒ Object
14
15
16
17
|
# File 'lib/turnkit/store.rb', line 14
def update_turn(_id, _attributes) = raise(NotImplementedError)
|