cadenya 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/cadenya/models/agent_spec.rb +23 -1
- data/lib/cadenya/models/agents/agent_variation_spec.rb +1 -22
- data/lib/cadenya/models/memory_layer_list_params.rb +22 -1
- data/lib/cadenya/models/memory_layer_spec.rb +19 -1
- data/lib/cadenya/models/objective.rb +38 -1
- data/lib/cadenya/models/objective_create_params.rb +28 -1
- data/lib/cadenya/models/objectives/objective_tool_call_data.rb +1 -9
- data/lib/cadenya/models/objectives/objective_tool_call_result.rb +27 -0
- data/lib/cadenya/models/objectives/objective_tool_call_result_audio_block.rb +46 -0
- data/lib/cadenya/models/objectives/objective_tool_call_result_content_block.rb +34 -0
- data/lib/cadenya/models/objectives/objective_tool_call_result_image_block.rb +46 -0
- data/lib/cadenya/models/objectives/objective_tool_call_result_text_block.rb +21 -0
- data/lib/cadenya/models/objectives/objective_tool_call_with_result.rb +102 -0
- data/lib/cadenya/models/objectives/tool_call_retrieve_params.rb +34 -0
- data/lib/cadenya/models/tool_result.rb +15 -7
- data/lib/cadenya/resources/memory_layers.rb +10 -1
- data/lib/cadenya/resources/objectives/tool_calls.rb +39 -0
- data/lib/cadenya/resources/objectives.rb +3 -1
- data/lib/cadenya/version.rb +1 -1
- data/lib/cadenya.rb +7 -0
- data/rbi/cadenya/models/agent_spec.rbi +34 -0
- data/rbi/cadenya/models/agents/agent_variation_spec.rbi +0 -32
- data/rbi/cadenya/models/memory_layer_list_params.rbi +26 -0
- data/rbi/cadenya/models/memory_layer_spec.rbi +26 -0
- data/rbi/cadenya/models/objective.rbi +57 -0
- data/rbi/cadenya/models/objective_create_params.rbi +48 -0
- data/rbi/cadenya/models/objectives/objective_tool_call_data.rbi +0 -11
- data/rbi/cadenya/models/objectives/objective_tool_call_result.rbi +54 -0
- data/rbi/cadenya/models/objectives/objective_tool_call_result_audio_block.rbi +69 -0
- data/rbi/cadenya/models/objectives/objective_tool_call_result_content_block.rbi +90 -0
- data/rbi/cadenya/models/objectives/objective_tool_call_result_image_block.rbi +69 -0
- data/rbi/cadenya/models/objectives/objective_tool_call_result_text_block.rbi +31 -0
- data/rbi/cadenya/models/objectives/objective_tool_call_with_result.rbi +219 -0
- data/rbi/cadenya/models/objectives/tool_call_retrieve_params.rbi +58 -0
- data/rbi/cadenya/models/tool_result.rbi +34 -12
- data/rbi/cadenya/resources/memory_layers.rbi +8 -0
- data/rbi/cadenya/resources/objectives/tool_calls.rbi +20 -0
- data/rbi/cadenya/resources/objectives.rbi +4 -0
- data/sig/cadenya/models/agent_spec.rbs +14 -0
- data/sig/cadenya/models/agents/agent_variation_spec.rbs +0 -14
- data/sig/cadenya/models/memory_layer_list_params.rbs +14 -0
- data/sig/cadenya/models/memory_layer_spec.rbs +14 -0
- data/sig/cadenya/models/objective.rbs +25 -0
- data/sig/cadenya/models/objective_create_params.rbs +21 -0
- data/sig/cadenya/models/objectives/objective_tool_call_data.rbs +0 -7
- data/sig/cadenya/models/objectives/objective_tool_call_result.rbs +24 -0
- data/sig/cadenya/models/objectives/objective_tool_call_result_audio_block.rbs +34 -0
- data/sig/cadenya/models/objectives/objective_tool_call_result_content_block.rbs +46 -0
- data/sig/cadenya/models/objectives/objective_tool_call_result_image_block.rbs +34 -0
- data/sig/cadenya/models/objectives/objective_tool_call_result_text_block.rbs +17 -0
- data/sig/cadenya/models/objectives/objective_tool_call_with_result.rbs +91 -0
- data/sig/cadenya/models/objectives/tool_call_retrieve_params.rbs +34 -0
- data/sig/cadenya/models/tool_result.rbs +15 -9
- data/sig/cadenya/resources/memory_layers.rbs +2 -0
- data/sig/cadenya/resources/objectives/tool_calls.rbs +7 -0
- data/sig/cadenya/resources/objectives.rbs +1 -0
- metadata +23 -2
|
@@ -4,6 +4,26 @@ module Cadenya
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Objectives
|
|
6
6
|
class ToolCalls
|
|
7
|
+
# Retrieves a single tool call, including the content the tool returned. Media
|
|
8
|
+
# content (images, audio) is served as short-lived signed URLs.
|
|
9
|
+
sig do
|
|
10
|
+
params(
|
|
11
|
+
tool_call_id: String,
|
|
12
|
+
workspace_id: String,
|
|
13
|
+
objective_id: String,
|
|
14
|
+
request_options: Cadenya::RequestOptions::OrHash
|
|
15
|
+
).returns(Cadenya::Objectives::ObjectiveToolCallWithResult)
|
|
16
|
+
end
|
|
17
|
+
def retrieve(
|
|
18
|
+
# The ID of the tool call to retrieve
|
|
19
|
+
tool_call_id,
|
|
20
|
+
workspace_id:,
|
|
21
|
+
# The ID of the objective. Supports "external_id:" prefix for external IDs.
|
|
22
|
+
objective_id:,
|
|
23
|
+
request_options: {}
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
|
|
7
27
|
# Lists all tool calls for an objective
|
|
8
28
|
sig do
|
|
9
29
|
params(
|
|
@@ -21,6 +21,8 @@ module Cadenya
|
|
|
21
21
|
workspace_id: String,
|
|
22
22
|
agent_id: String,
|
|
23
23
|
data: T::Hash[Symbol, T.anything],
|
|
24
|
+
episodic_memory:
|
|
25
|
+
Cadenya::ObjectiveCreateParams::EpisodicMemory::OrHash,
|
|
24
26
|
initial_message: String,
|
|
25
27
|
memory_stack: T::Array[Cadenya::MemoryReference::OrHash],
|
|
26
28
|
metadata: Cadenya::CreateOperationMetadata::OrHash,
|
|
@@ -36,6 +38,8 @@ module Cadenya
|
|
|
36
38
|
# Arbitrary data for the objective. May be used in liquid templates for prompts
|
|
37
39
|
# configured on the agent variation
|
|
38
40
|
data:,
|
|
41
|
+
# Episodic is used to configure the episodic memory for the objective
|
|
42
|
+
episodic_memory: nil,
|
|
39
43
|
# Optional override for the initial message sent to the agent. This becomes the
|
|
40
44
|
# first user message in the LLM chat history. When not set, the selected
|
|
41
45
|
# variation's user_message_template is rendered with user_data instead. If neither
|
|
@@ -4,6 +4,8 @@ module Cadenya
|
|
|
4
4
|
{
|
|
5
5
|
variation_selection_mode: Cadenya::Models::AgentSpec::variation_selection_mode,
|
|
6
6
|
description: String,
|
|
7
|
+
enable_episodic_memory: bool,
|
|
8
|
+
episodic_memory_ttl: Integer,
|
|
7
9
|
input_data_schema: ::Hash[Symbol, top],
|
|
8
10
|
output_definition: ::Hash[Symbol, top],
|
|
9
11
|
webhook_events_url: String
|
|
@@ -16,6 +18,14 @@ module Cadenya
|
|
|
16
18
|
|
|
17
19
|
def description=: (String) -> String
|
|
18
20
|
|
|
21
|
+
attr_reader enable_episodic_memory: bool?
|
|
22
|
+
|
|
23
|
+
def enable_episodic_memory=: (bool) -> bool
|
|
24
|
+
|
|
25
|
+
attr_reader episodic_memory_ttl: Integer?
|
|
26
|
+
|
|
27
|
+
def episodic_memory_ttl=: (Integer) -> Integer
|
|
28
|
+
|
|
19
29
|
attr_reader input_data_schema: ::Hash[Symbol, top]?
|
|
20
30
|
|
|
21
31
|
def input_data_schema=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
@@ -31,6 +41,8 @@ module Cadenya
|
|
|
31
41
|
def initialize: (
|
|
32
42
|
variation_selection_mode: Cadenya::Models::AgentSpec::variation_selection_mode,
|
|
33
43
|
?description: String,
|
|
44
|
+
?enable_episodic_memory: bool,
|
|
45
|
+
?episodic_memory_ttl: Integer,
|
|
34
46
|
?input_data_schema: ::Hash[Symbol, top],
|
|
35
47
|
?output_definition: ::Hash[Symbol, top],
|
|
36
48
|
?webhook_events_url: String
|
|
@@ -39,6 +51,8 @@ module Cadenya
|
|
|
39
51
|
def to_hash: -> {
|
|
40
52
|
variation_selection_mode: Cadenya::Models::AgentSpec::variation_selection_mode,
|
|
41
53
|
description: String,
|
|
54
|
+
enable_episodic_memory: bool,
|
|
55
|
+
episodic_memory_ttl: Integer,
|
|
42
56
|
input_data_schema: ::Hash[Symbol, top],
|
|
43
57
|
output_definition: ::Hash[Symbol, top],
|
|
44
58
|
webhook_events_url: String
|
|
@@ -8,8 +8,6 @@ module Cadenya
|
|
|
8
8
|
compaction_config: Cadenya::Agents::AgentVariationSpecCompactionConfig,
|
|
9
9
|
constraints: Cadenya::Agents::AgentVariationSpecConstraints,
|
|
10
10
|
description: String,
|
|
11
|
-
enable_episodic_memory: bool,
|
|
12
|
-
episodic_memory_ttl: Integer,
|
|
13
11
|
model_config: Cadenya::Agents::AgentVariationSpecModelConfig,
|
|
14
12
|
progressive_discovery: Cadenya::Agents::AgentVariationSpecProgressiveDiscovery,
|
|
15
13
|
system_prompt_template: String,
|
|
@@ -34,14 +32,6 @@ module Cadenya
|
|
|
34
32
|
|
|
35
33
|
def description=: (String) -> String
|
|
36
34
|
|
|
37
|
-
attr_reader enable_episodic_memory: bool?
|
|
38
|
-
|
|
39
|
-
def enable_episodic_memory=: (bool) -> bool
|
|
40
|
-
|
|
41
|
-
attr_reader episodic_memory_ttl: Integer?
|
|
42
|
-
|
|
43
|
-
def episodic_memory_ttl=: (Integer) -> Integer
|
|
44
|
-
|
|
45
35
|
attr_reader model_config: Cadenya::Agents::AgentVariationSpecModelConfig?
|
|
46
36
|
|
|
47
37
|
def model_config=: (
|
|
@@ -70,8 +60,6 @@ module Cadenya
|
|
|
70
60
|
?compaction_config: Cadenya::Agents::AgentVariationSpecCompactionConfig,
|
|
71
61
|
?constraints: Cadenya::Agents::AgentVariationSpecConstraints,
|
|
72
62
|
?description: String,
|
|
73
|
-
?enable_episodic_memory: bool,
|
|
74
|
-
?episodic_memory_ttl: Integer,
|
|
75
63
|
?model_config: Cadenya::Agents::AgentVariationSpecModelConfig,
|
|
76
64
|
?progressive_discovery: Cadenya::Agents::AgentVariationSpecProgressiveDiscovery,
|
|
77
65
|
?system_prompt_template: String,
|
|
@@ -83,8 +71,6 @@ module Cadenya
|
|
|
83
71
|
compaction_config: Cadenya::Agents::AgentVariationSpecCompactionConfig,
|
|
84
72
|
constraints: Cadenya::Agents::AgentVariationSpecConstraints,
|
|
85
73
|
description: String,
|
|
86
|
-
enable_episodic_memory: bool,
|
|
87
|
-
episodic_memory_ttl: Integer,
|
|
88
74
|
model_config: Cadenya::Agents::AgentVariationSpecModelConfig,
|
|
89
75
|
progressive_discovery: Cadenya::Agents::AgentVariationSpecProgressiveDiscovery,
|
|
90
76
|
system_prompt_template: String,
|
|
@@ -3,8 +3,10 @@ module Cadenya
|
|
|
3
3
|
type memory_layer_list_params =
|
|
4
4
|
{
|
|
5
5
|
workspace_id: String,
|
|
6
|
+
agent_id: String,
|
|
6
7
|
bundle_key: String,
|
|
7
8
|
cursor: String,
|
|
9
|
+
episodic_key_prefix: String,
|
|
8
10
|
include_info: bool,
|
|
9
11
|
limit: Integer,
|
|
10
12
|
prefix: String,
|
|
@@ -20,6 +22,10 @@ module Cadenya
|
|
|
20
22
|
|
|
21
23
|
attr_accessor workspace_id: String
|
|
22
24
|
|
|
25
|
+
attr_reader agent_id: String?
|
|
26
|
+
|
|
27
|
+
def agent_id=: (String) -> String
|
|
28
|
+
|
|
23
29
|
attr_reader bundle_key: String?
|
|
24
30
|
|
|
25
31
|
def bundle_key=: (String) -> String
|
|
@@ -28,6 +34,10 @@ module Cadenya
|
|
|
28
34
|
|
|
29
35
|
def cursor=: (String) -> String
|
|
30
36
|
|
|
37
|
+
attr_reader episodic_key_prefix: String?
|
|
38
|
+
|
|
39
|
+
def episodic_key_prefix=: (String) -> String
|
|
40
|
+
|
|
31
41
|
attr_reader include_info: bool?
|
|
32
42
|
|
|
33
43
|
def include_info=: (bool) -> bool
|
|
@@ -56,8 +66,10 @@ module Cadenya
|
|
|
56
66
|
|
|
57
67
|
def initialize: (
|
|
58
68
|
workspace_id: String,
|
|
69
|
+
?agent_id: String,
|
|
59
70
|
?bundle_key: String,
|
|
60
71
|
?cursor: String,
|
|
72
|
+
?episodic_key_prefix: String,
|
|
61
73
|
?include_info: bool,
|
|
62
74
|
?limit: Integer,
|
|
63
75
|
?prefix: String,
|
|
@@ -69,8 +81,10 @@ module Cadenya
|
|
|
69
81
|
|
|
70
82
|
def to_hash: -> {
|
|
71
83
|
workspace_id: String,
|
|
84
|
+
agent_id: String,
|
|
72
85
|
bundle_key: String,
|
|
73
86
|
cursor: String,
|
|
87
|
+
episodic_key_prefix: String,
|
|
74
88
|
include_info: bool,
|
|
75
89
|
limit: Integer,
|
|
76
90
|
prefix: String,
|
|
@@ -3,7 +3,9 @@ module Cadenya
|
|
|
3
3
|
type memory_layer_spec =
|
|
4
4
|
{
|
|
5
5
|
type: Cadenya::Models::MemoryLayerSpec::type_,
|
|
6
|
+
agent_id: String,
|
|
6
7
|
description: String,
|
|
8
|
+
episodic_key: String,
|
|
7
9
|
expires_at: Time,
|
|
8
10
|
system_managed: bool
|
|
9
11
|
}
|
|
@@ -15,6 +17,14 @@ module Cadenya
|
|
|
15
17
|
|
|
16
18
|
def description=: (String) -> String
|
|
17
19
|
|
|
20
|
+
attr_reader agent_id: String?
|
|
21
|
+
|
|
22
|
+
def agent_id=: (String) -> String
|
|
23
|
+
|
|
24
|
+
attr_reader episodic_key: String?
|
|
25
|
+
|
|
26
|
+
def episodic_key=: (String) -> String
|
|
27
|
+
|
|
18
28
|
attr_reader expires_at: Time?
|
|
19
29
|
|
|
20
30
|
def expires_at=: (Time) -> Time
|
|
@@ -25,14 +35,18 @@ module Cadenya
|
|
|
25
35
|
|
|
26
36
|
def initialize: (
|
|
27
37
|
type: Cadenya::Models::MemoryLayerSpec::type_,
|
|
38
|
+
?agent_id: String,
|
|
28
39
|
?description: String,
|
|
40
|
+
?episodic_key: String,
|
|
29
41
|
?expires_at: Time,
|
|
30
42
|
?system_managed: bool
|
|
31
43
|
) -> void
|
|
32
44
|
|
|
33
45
|
def to_hash: -> {
|
|
34
46
|
type: Cadenya::Models::MemoryLayerSpec::type_,
|
|
47
|
+
agent_id: String,
|
|
35
48
|
description: String,
|
|
49
|
+
episodic_key: String,
|
|
36
50
|
expires_at: Time,
|
|
37
51
|
system_managed: bool
|
|
38
52
|
}
|
|
@@ -8,6 +8,7 @@ module Cadenya
|
|
|
8
8
|
state: Cadenya::Models::Objective::state,
|
|
9
9
|
system_prompt: String,
|
|
10
10
|
data: ::Hash[Symbol, top],
|
|
11
|
+
episodic_memory: Cadenya::Objective::EpisodicMemory,
|
|
11
12
|
info: Cadenya::ObjectiveInfo,
|
|
12
13
|
memory_stack: ::Array[Cadenya::MemoryReference],
|
|
13
14
|
output: ::Hash[Symbol, top],
|
|
@@ -22,6 +23,12 @@ module Cadenya
|
|
|
22
23
|
|
|
23
24
|
attr_accessor metadata: Cadenya::OperationMetadata
|
|
24
25
|
|
|
26
|
+
attr_reader episodic_memory: Cadenya::Objective::EpisodicMemory?
|
|
27
|
+
|
|
28
|
+
def episodic_memory=: (
|
|
29
|
+
Cadenya::Objective::EpisodicMemory
|
|
30
|
+
) -> Cadenya::Objective::EpisodicMemory
|
|
31
|
+
|
|
25
32
|
attr_reader memory_stack: ::Array[Cadenya::MemoryReference]?
|
|
26
33
|
|
|
27
34
|
def memory_stack=: (
|
|
@@ -71,6 +78,7 @@ module Cadenya
|
|
|
71
78
|
state: Cadenya::Models::Objective::state,
|
|
72
79
|
system_prompt: String,
|
|
73
80
|
?data: ::Hash[Symbol, top],
|
|
81
|
+
?episodic_memory: Cadenya::Objective::EpisodicMemory,
|
|
74
82
|
?info: Cadenya::ObjectiveInfo,
|
|
75
83
|
?memory_stack: ::Array[Cadenya::MemoryReference],
|
|
76
84
|
?output: ::Hash[Symbol, top],
|
|
@@ -87,6 +95,7 @@ module Cadenya
|
|
|
87
95
|
state: Cadenya::Models::Objective::state,
|
|
88
96
|
system_prompt: String,
|
|
89
97
|
data: ::Hash[Symbol, top],
|
|
98
|
+
episodic_memory: Cadenya::Objective::EpisodicMemory,
|
|
90
99
|
info: Cadenya::ObjectiveInfo,
|
|
91
100
|
memory_stack: ::Array[Cadenya::MemoryReference],
|
|
92
101
|
output: ::Hash[Symbol, top],
|
|
@@ -118,6 +127,22 @@ module Cadenya
|
|
|
118
127
|
|
|
119
128
|
def self?.values: -> ::Array[Cadenya::Models::Objective::state]
|
|
120
129
|
end
|
|
130
|
+
|
|
131
|
+
type episodic_memory = { key: String, memory_layer_id: String }
|
|
132
|
+
|
|
133
|
+
class EpisodicMemory < Cadenya::Internal::Type::BaseModel
|
|
134
|
+
attr_reader key: String?
|
|
135
|
+
|
|
136
|
+
def key=: (String) -> String
|
|
137
|
+
|
|
138
|
+
attr_reader memory_layer_id: String?
|
|
139
|
+
|
|
140
|
+
def memory_layer_id=: (String) -> String
|
|
141
|
+
|
|
142
|
+
def initialize: (?key: String, ?memory_layer_id: String) -> void
|
|
143
|
+
|
|
144
|
+
def to_hash: -> { key: String, memory_layer_id: String }
|
|
145
|
+
end
|
|
121
146
|
end
|
|
122
147
|
end
|
|
123
148
|
end
|
|
@@ -5,6 +5,7 @@ module Cadenya
|
|
|
5
5
|
workspace_id: String,
|
|
6
6
|
agent_id: String,
|
|
7
7
|
data: ::Hash[Symbol, top],
|
|
8
|
+
episodic_memory: Cadenya::ObjectiveCreateParams::EpisodicMemory,
|
|
8
9
|
initial_message: String,
|
|
9
10
|
memory_stack: ::Array[Cadenya::MemoryReference],
|
|
10
11
|
metadata: Cadenya::CreateOperationMetadata,
|
|
@@ -24,6 +25,12 @@ module Cadenya
|
|
|
24
25
|
|
|
25
26
|
attr_accessor data: ::Hash[Symbol, top]
|
|
26
27
|
|
|
28
|
+
attr_reader episodic_memory: Cadenya::ObjectiveCreateParams::EpisodicMemory?
|
|
29
|
+
|
|
30
|
+
def episodic_memory=: (
|
|
31
|
+
Cadenya::ObjectiveCreateParams::EpisodicMemory
|
|
32
|
+
) -> Cadenya::ObjectiveCreateParams::EpisodicMemory
|
|
33
|
+
|
|
27
34
|
attr_reader initial_message: String?
|
|
28
35
|
|
|
29
36
|
def initial_message=: (String) -> String
|
|
@@ -58,6 +65,7 @@ module Cadenya
|
|
|
58
65
|
workspace_id: String,
|
|
59
66
|
agent_id: String,
|
|
60
67
|
data: ::Hash[Symbol, top],
|
|
68
|
+
?episodic_memory: Cadenya::ObjectiveCreateParams::EpisodicMemory,
|
|
61
69
|
?initial_message: String,
|
|
62
70
|
?memory_stack: ::Array[Cadenya::MemoryReference],
|
|
63
71
|
?metadata: Cadenya::CreateOperationMetadata,
|
|
@@ -71,6 +79,7 @@ module Cadenya
|
|
|
71
79
|
workspace_id: String,
|
|
72
80
|
agent_id: String,
|
|
73
81
|
data: ::Hash[Symbol, top],
|
|
82
|
+
episodic_memory: Cadenya::ObjectiveCreateParams::EpisodicMemory,
|
|
74
83
|
initial_message: String,
|
|
75
84
|
memory_stack: ::Array[Cadenya::MemoryReference],
|
|
76
85
|
metadata: Cadenya::CreateOperationMetadata,
|
|
@@ -80,6 +89,18 @@ module Cadenya
|
|
|
80
89
|
request_options: Cadenya::RequestOptions
|
|
81
90
|
}
|
|
82
91
|
|
|
92
|
+
type episodic_memory = { key: String, memory_layer_id: String }
|
|
93
|
+
|
|
94
|
+
class EpisodicMemory < Cadenya::Internal::Type::BaseModel
|
|
95
|
+
attr_reader key: String?
|
|
96
|
+
|
|
97
|
+
def key=: (String) -> String
|
|
98
|
+
|
|
99
|
+
def initialize: (?key: String) -> void
|
|
100
|
+
|
|
101
|
+
def to_hash: -> { key: String, memory_layer_id: String }
|
|
102
|
+
end
|
|
103
|
+
|
|
83
104
|
type secret = { name: String, value: String }
|
|
84
105
|
|
|
85
106
|
class Secret < Cadenya::Internal::Type::BaseModel
|
|
@@ -8,7 +8,6 @@ module Cadenya
|
|
|
8
8
|
callable: Cadenya::CallableTool,
|
|
9
9
|
arguments: ::Hash[Symbol, top],
|
|
10
10
|
memo: String,
|
|
11
|
-
result: String,
|
|
12
11
|
status_changed_by: Cadenya::Profile
|
|
13
12
|
}
|
|
14
13
|
|
|
@@ -23,10 +22,6 @@ module Cadenya
|
|
|
23
22
|
|
|
24
23
|
def memo=: (String) -> String
|
|
25
24
|
|
|
26
|
-
attr_reader result: String?
|
|
27
|
-
|
|
28
|
-
def result=: (String) -> String
|
|
29
|
-
|
|
30
25
|
attr_reader status_changed_by: Cadenya::Profile?
|
|
31
26
|
|
|
32
27
|
def status_changed_by=: (Cadenya::Profile) -> Cadenya::Profile
|
|
@@ -35,7 +30,6 @@ module Cadenya
|
|
|
35
30
|
callable: Cadenya::CallableTool,
|
|
36
31
|
?arguments: ::Hash[Symbol, top],
|
|
37
32
|
?memo: String,
|
|
38
|
-
?result: String,
|
|
39
33
|
?status_changed_by: Cadenya::Profile
|
|
40
34
|
) -> void
|
|
41
35
|
|
|
@@ -43,7 +37,6 @@ module Cadenya
|
|
|
43
37
|
callable: Cadenya::CallableTool,
|
|
44
38
|
arguments: ::Hash[Symbol, top],
|
|
45
39
|
memo: String,
|
|
46
|
-
result: String,
|
|
47
40
|
status_changed_by: Cadenya::Profile
|
|
48
41
|
}
|
|
49
42
|
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module Cadenya
|
|
2
|
+
module Models
|
|
3
|
+
class ObjectiveToolCallResult = Objectives::ObjectiveToolCallResult
|
|
4
|
+
|
|
5
|
+
module Objectives
|
|
6
|
+
type objective_tool_call_result =
|
|
7
|
+
{
|
|
8
|
+
content: ::Array[Cadenya::Objectives::ObjectiveToolCallResultContentBlock]
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class ObjectiveToolCallResult < Cadenya::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor content: ::Array[Cadenya::Objectives::ObjectiveToolCallResultContentBlock]
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
content: ::Array[Cadenya::Objectives::ObjectiveToolCallResultContentBlock]
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
content: ::Array[Cadenya::Objectives::ObjectiveToolCallResultContentBlock]
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Cadenya
|
|
2
|
+
module Models
|
|
3
|
+
class ObjectiveToolCallResultAudioBlock = Objectives::ObjectiveToolCallResultAudioBlock
|
|
4
|
+
|
|
5
|
+
module Objectives
|
|
6
|
+
type objective_tool_call_result_audio_block =
|
|
7
|
+
{ expires_at: Time, mime_type: String, size_bytes: String, url: String }
|
|
8
|
+
|
|
9
|
+
class ObjectiveToolCallResultAudioBlock < Cadenya::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor expires_at: Time
|
|
11
|
+
|
|
12
|
+
attr_accessor mime_type: String
|
|
13
|
+
|
|
14
|
+
attr_accessor size_bytes: String
|
|
15
|
+
|
|
16
|
+
attr_accessor url: String
|
|
17
|
+
|
|
18
|
+
def initialize: (
|
|
19
|
+
expires_at: Time,
|
|
20
|
+
mime_type: String,
|
|
21
|
+
size_bytes: String,
|
|
22
|
+
url: String
|
|
23
|
+
) -> void
|
|
24
|
+
|
|
25
|
+
def to_hash: -> {
|
|
26
|
+
expires_at: Time,
|
|
27
|
+
mime_type: String,
|
|
28
|
+
size_bytes: String,
|
|
29
|
+
url: String
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module Cadenya
|
|
2
|
+
module Models
|
|
3
|
+
class ObjectiveToolCallResultContentBlock = Objectives::ObjectiveToolCallResultContentBlock
|
|
4
|
+
|
|
5
|
+
module Objectives
|
|
6
|
+
type objective_tool_call_result_content_block =
|
|
7
|
+
{
|
|
8
|
+
audio: Cadenya::Objectives::ObjectiveToolCallResultAudioBlock,
|
|
9
|
+
image: Cadenya::Objectives::ObjectiveToolCallResultImageBlock,
|
|
10
|
+
text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class ObjectiveToolCallResultContentBlock < Cadenya::Internal::Type::BaseModel
|
|
14
|
+
attr_reader audio: Cadenya::Objectives::ObjectiveToolCallResultAudioBlock?
|
|
15
|
+
|
|
16
|
+
def audio=: (
|
|
17
|
+
Cadenya::Objectives::ObjectiveToolCallResultAudioBlock
|
|
18
|
+
) -> Cadenya::Objectives::ObjectiveToolCallResultAudioBlock
|
|
19
|
+
|
|
20
|
+
attr_reader image: Cadenya::Objectives::ObjectiveToolCallResultImageBlock?
|
|
21
|
+
|
|
22
|
+
def image=: (
|
|
23
|
+
Cadenya::Objectives::ObjectiveToolCallResultImageBlock
|
|
24
|
+
) -> Cadenya::Objectives::ObjectiveToolCallResultImageBlock
|
|
25
|
+
|
|
26
|
+
attr_reader text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock?
|
|
27
|
+
|
|
28
|
+
def text=: (
|
|
29
|
+
Cadenya::Objectives::ObjectiveToolCallResultTextBlock
|
|
30
|
+
) -> Cadenya::Objectives::ObjectiveToolCallResultTextBlock
|
|
31
|
+
|
|
32
|
+
def initialize: (
|
|
33
|
+
?audio: Cadenya::Objectives::ObjectiveToolCallResultAudioBlock,
|
|
34
|
+
?image: Cadenya::Objectives::ObjectiveToolCallResultImageBlock,
|
|
35
|
+
?text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock
|
|
36
|
+
) -> void
|
|
37
|
+
|
|
38
|
+
def to_hash: -> {
|
|
39
|
+
audio: Cadenya::Objectives::ObjectiveToolCallResultAudioBlock,
|
|
40
|
+
image: Cadenya::Objectives::ObjectiveToolCallResultImageBlock,
|
|
41
|
+
text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Cadenya
|
|
2
|
+
module Models
|
|
3
|
+
class ObjectiveToolCallResultImageBlock = Objectives::ObjectiveToolCallResultImageBlock
|
|
4
|
+
|
|
5
|
+
module Objectives
|
|
6
|
+
type objective_tool_call_result_image_block =
|
|
7
|
+
{ expires_at: Time, mime_type: String, size_bytes: String, url: String }
|
|
8
|
+
|
|
9
|
+
class ObjectiveToolCallResultImageBlock < Cadenya::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor expires_at: Time
|
|
11
|
+
|
|
12
|
+
attr_accessor mime_type: String
|
|
13
|
+
|
|
14
|
+
attr_accessor size_bytes: String
|
|
15
|
+
|
|
16
|
+
attr_accessor url: String
|
|
17
|
+
|
|
18
|
+
def initialize: (
|
|
19
|
+
expires_at: Time,
|
|
20
|
+
mime_type: String,
|
|
21
|
+
size_bytes: String,
|
|
22
|
+
url: String
|
|
23
|
+
) -> void
|
|
24
|
+
|
|
25
|
+
def to_hash: -> {
|
|
26
|
+
expires_at: Time,
|
|
27
|
+
mime_type: String,
|
|
28
|
+
size_bytes: String,
|
|
29
|
+
url: String
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Cadenya
|
|
2
|
+
module Models
|
|
3
|
+
class ObjectiveToolCallResultTextBlock = Objectives::ObjectiveToolCallResultTextBlock
|
|
4
|
+
|
|
5
|
+
module Objectives
|
|
6
|
+
type objective_tool_call_result_text_block = { text: String }
|
|
7
|
+
|
|
8
|
+
class ObjectiveToolCallResultTextBlock < Cadenya::Internal::Type::BaseModel
|
|
9
|
+
attr_accessor text: String
|
|
10
|
+
|
|
11
|
+
def initialize: (text: String) -> void
|
|
12
|
+
|
|
13
|
+
def to_hash: -> { text: String }
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
module Cadenya
|
|
2
|
+
module Models
|
|
3
|
+
class ObjectiveToolCallWithResult = Objectives::ObjectiveToolCallWithResult
|
|
4
|
+
|
|
5
|
+
module Objectives
|
|
6
|
+
type objective_tool_call_with_result =
|
|
7
|
+
{
|
|
8
|
+
data: Cadenya::Objectives::ObjectiveToolCallData,
|
|
9
|
+
execution_status: Cadenya::Models::Objectives::ObjectiveToolCallWithResult::execution_status,
|
|
10
|
+
info: Cadenya::Objectives::ObjectiveToolCallInfo,
|
|
11
|
+
metadata: Cadenya::OperationMetadata,
|
|
12
|
+
status: Cadenya::Models::Objectives::ObjectiveToolCallWithResult::status,
|
|
13
|
+
result: Cadenya::Objectives::ObjectiveToolCallResult
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class ObjectiveToolCallWithResult < Cadenya::Internal::Type::BaseModel
|
|
17
|
+
attr_accessor data: Cadenya::Objectives::ObjectiveToolCallData
|
|
18
|
+
|
|
19
|
+
attr_accessor info: Cadenya::Objectives::ObjectiveToolCallInfo
|
|
20
|
+
|
|
21
|
+
attr_accessor metadata: Cadenya::OperationMetadata
|
|
22
|
+
|
|
23
|
+
attr_accessor status: Cadenya::Models::Objectives::ObjectiveToolCallWithResult::status
|
|
24
|
+
|
|
25
|
+
attr_accessor execution_status: Cadenya::Models::Objectives::ObjectiveToolCallWithResult::execution_status
|
|
26
|
+
|
|
27
|
+
attr_reader result: Cadenya::Objectives::ObjectiveToolCallResult?
|
|
28
|
+
|
|
29
|
+
def result=: (
|
|
30
|
+
Cadenya::Objectives::ObjectiveToolCallResult
|
|
31
|
+
) -> Cadenya::Objectives::ObjectiveToolCallResult
|
|
32
|
+
|
|
33
|
+
def initialize: (
|
|
34
|
+
data: Cadenya::Objectives::ObjectiveToolCallData,
|
|
35
|
+
execution_status: Cadenya::Models::Objectives::ObjectiveToolCallWithResult::execution_status,
|
|
36
|
+
info: Cadenya::Objectives::ObjectiveToolCallInfo,
|
|
37
|
+
metadata: Cadenya::OperationMetadata,
|
|
38
|
+
status: Cadenya::Models::Objectives::ObjectiveToolCallWithResult::status,
|
|
39
|
+
?result: Cadenya::Objectives::ObjectiveToolCallResult
|
|
40
|
+
) -> void
|
|
41
|
+
|
|
42
|
+
def to_hash: -> {
|
|
43
|
+
data: Cadenya::Objectives::ObjectiveToolCallData,
|
|
44
|
+
execution_status: Cadenya::Models::Objectives::ObjectiveToolCallWithResult::execution_status,
|
|
45
|
+
info: Cadenya::Objectives::ObjectiveToolCallInfo,
|
|
46
|
+
metadata: Cadenya::OperationMetadata,
|
|
47
|
+
status: Cadenya::Models::Objectives::ObjectiveToolCallWithResult::status,
|
|
48
|
+
result: Cadenya::Objectives::ObjectiveToolCallResult
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
type execution_status =
|
|
52
|
+
:TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED
|
|
53
|
+
| :TOOL_CALL_EXECUTION_STATUS_PENDING
|
|
54
|
+
| :TOOL_CALL_EXECUTION_STATUS_RUNNING
|
|
55
|
+
| :TOOL_CALL_EXECUTION_STATUS_COMPLETED
|
|
56
|
+
| :TOOL_CALL_EXECUTION_STATUS_ERRORED
|
|
57
|
+
|
|
58
|
+
module ExecutionStatus
|
|
59
|
+
extend Cadenya::Internal::Type::Enum
|
|
60
|
+
|
|
61
|
+
TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED: :TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED
|
|
62
|
+
TOOL_CALL_EXECUTION_STATUS_PENDING: :TOOL_CALL_EXECUTION_STATUS_PENDING
|
|
63
|
+
TOOL_CALL_EXECUTION_STATUS_RUNNING: :TOOL_CALL_EXECUTION_STATUS_RUNNING
|
|
64
|
+
TOOL_CALL_EXECUTION_STATUS_COMPLETED: :TOOL_CALL_EXECUTION_STATUS_COMPLETED
|
|
65
|
+
TOOL_CALL_EXECUTION_STATUS_ERRORED: :TOOL_CALL_EXECUTION_STATUS_ERRORED
|
|
66
|
+
|
|
67
|
+
def self?.values: -> ::Array[Cadenya::Models::Objectives::ObjectiveToolCallWithResult::execution_status]
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
type status =
|
|
71
|
+
:TOOL_CALL_STATUS_UNSPECIFIED
|
|
72
|
+
| :TOOL_CALL_STATUS_AUTO_APPROVED
|
|
73
|
+
| :TOOL_CALL_STATUS_WAITING_FOR_APPROVAL
|
|
74
|
+
| :TOOL_CALL_STATUS_APPROVED
|
|
75
|
+
| :TOOL_CALL_STATUS_DENIED
|
|
76
|
+
|
|
77
|
+
module Status
|
|
78
|
+
extend Cadenya::Internal::Type::Enum
|
|
79
|
+
|
|
80
|
+
TOOL_CALL_STATUS_UNSPECIFIED: :TOOL_CALL_STATUS_UNSPECIFIED
|
|
81
|
+
TOOL_CALL_STATUS_AUTO_APPROVED: :TOOL_CALL_STATUS_AUTO_APPROVED
|
|
82
|
+
TOOL_CALL_STATUS_WAITING_FOR_APPROVAL: :TOOL_CALL_STATUS_WAITING_FOR_APPROVAL
|
|
83
|
+
TOOL_CALL_STATUS_APPROVED: :TOOL_CALL_STATUS_APPROVED
|
|
84
|
+
TOOL_CALL_STATUS_DENIED: :TOOL_CALL_STATUS_DENIED
|
|
85
|
+
|
|
86
|
+
def self?.values: -> ::Array[Cadenya::Models::Objectives::ObjectiveToolCallWithResult::status]
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Cadenya
|
|
2
|
+
module Models
|
|
3
|
+
module Objectives
|
|
4
|
+
type tool_call_retrieve_params =
|
|
5
|
+
{ workspace_id: String, objective_id: String, tool_call_id: String }
|
|
6
|
+
& Cadenya::Internal::Type::request_parameters
|
|
7
|
+
|
|
8
|
+
class ToolCallRetrieveParams < Cadenya::Internal::Type::BaseModel
|
|
9
|
+
extend Cadenya::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Cadenya::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
attr_accessor workspace_id: String
|
|
13
|
+
|
|
14
|
+
attr_accessor objective_id: String
|
|
15
|
+
|
|
16
|
+
attr_accessor tool_call_id: String
|
|
17
|
+
|
|
18
|
+
def initialize: (
|
|
19
|
+
workspace_id: String,
|
|
20
|
+
objective_id: String,
|
|
21
|
+
tool_call_id: String,
|
|
22
|
+
?request_options: Cadenya::request_opts
|
|
23
|
+
) -> void
|
|
24
|
+
|
|
25
|
+
def to_hash: -> {
|
|
26
|
+
workspace_id: String,
|
|
27
|
+
objective_id: String,
|
|
28
|
+
tool_call_id: String,
|
|
29
|
+
request_options: Cadenya::RequestOptions
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|