fetch_hive 0.2.3 → 0.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f27931a3ac0003f9116aa9e5d0fc8a872ace63a0514f5c700cd18df613c56d4
4
- data.tar.gz: 0ebadee4a39f04f58af432fee05f8f3398397bf806c520506f9e808e00a4edfc
3
+ metadata.gz: 37b77a6a159964d561dc379a54c47c8231e235a8f60b2397bed73aaeb79304b3
4
+ data.tar.gz: a805ca9d930d1ad821b673a84b95a8bf854611eccb619716895b24d256aa6b1e
5
5
  SHA512:
6
- metadata.gz: 4c3c0e5dc156a36db4bf8fe934f8cd8d65dc4b85e56c03deddb77f10fe7e7118bbf70946ee972fe666cefd40aab9d63e5fc1c6cfb0220876939473e53fa95e45
7
- data.tar.gz: e2a222c32d2857f10030aaa90e1aefd1bae8a0cab2e9f3c1a3b0a97e526c3ffbd2473c124e81a4098b54755e0a895f3674eb1d06cd71eb2fa7185bee1a5e9e7e
6
+ metadata.gz: ffa21ea91982cf6cbf080b2db47f41688e2b30465f738c6cb8cc166173dfa4efb7ab367195bcd3cff48e22d18a5c88ea38e22ece304020d5cbfb0e5238421591
7
+ data.tar.gz: e4da47bd790f4fa171613251bd89cf5db5dbc1eb7539ed044e1fb9cd7e5bc0005ef0ea91606353211c8f94f3479c74a0bc09bfacc6c803929ea97f972399a6b9
data/README.md CHANGED
@@ -9,7 +9,7 @@ Official Ruby SDK for [Fetch Hive](https://fetchhive.com) — invoke AI prompts,
9
9
  Add to your `Gemfile`:
10
10
 
11
11
  ```ruby
12
- gem "fetch_hive", "~> 0.2.3"
12
+ gem "fetch_hive", "~> 0.2.4"
13
13
  ```
14
14
 
15
15
  Then run:
@@ -48,7 +48,10 @@ puts result["response"]
48
48
 
49
49
  ```ruby
50
50
  client.invoke_prompt_stream(deployment: "my-prompt", inputs: { name: "Alice" }) do |chunk|
51
- print chunk["content"] if chunk["type"] == "delta"
51
+ case chunk["type"]
52
+ when "response" then print chunk["response"]
53
+ when "usage" then puts "\nUsage: #{chunk['usage']}"
54
+ end
52
55
  end
53
56
  ```
54
57
 
@@ -93,8 +96,9 @@ client.invoke_agent_stream(
93
96
  thread_id: "session-abc123" # optional — persist conversation history
94
97
  ) do |chunk|
95
98
  case chunk["type"]
96
- when "delta" then print chunk["content"]
97
- when "tool_start" then puts "\nCalling tool: #{chunk['tool_name']}"
99
+ when "response" then print chunk["response"]
100
+ when "tool" then puts "\nCalling tool: #{chunk['tool']}"
101
+ when "usage" then puts "\nUsage: #{chunk['usage']}"
98
102
  end
99
103
  end
100
104
  ```
@@ -138,7 +142,7 @@ client = FetchHive::Client.new # picks up FETCH_HIVE_API_KEY automatically
138
142
 
139
143
  ## Version
140
144
 
141
- 0.2.3
145
+ 0.2.4
142
146
 
143
147
  ## License
144
148
 
@@ -17,7 +17,11 @@ module FetchHive
17
17
  #
18
18
  # # Streaming agent
19
19
  # client.invoke_agent_stream(agent: "my-agent", message: "Hello") do |chunk|
20
- # print chunk["content"] if chunk["type"] == "delta"
20
+ # case chunk["type"]
21
+ # when "response" then print chunk["response"]
22
+ # when "tool" then puts "\nCalling tool: #{chunk['tool']}"
23
+ # when "usage" then puts "\nUsage: #{chunk['usage']}"
24
+ # end
21
25
  # end
22
26
  #
23
27
  class Client
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -14,30 +14,54 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FetchHive::Generated
17
- # A single event in a Server-Sent Events stream. The type field is a runtime discriminator. Known values: delta, done, tool_start, tool_end, error.
17
+ # A single event in a Server-Sent Events stream. The `type` field is a runtime discriminator. Known values: - `reasoning` a reasoning / thinking chunk (prompt and agent streams) - `response` — a text chunk (prompt and agent streams) - `tool` — a tool invocation result (agent stream only) - `usage` — final token usage event; signals end of meaningful stream content - `summary` — auto-summarization event emitted before reasoning when a thread history was compressed (agent stream only) - `error` — server-side error during streaming The stream is terminated by `data: [DONE]`, which is handled by the SSE parser and never surfaced as a chunk.
18
18
  class SseChunk < ApiModelBase
19
19
  # Event type discriminator.
20
20
  attr_accessor :type
21
21
 
22
- # Text delta content (present for type \"delta\").
23
- attr_accessor :content
22
+ # Text content of the chunk. Present for `reasoning` and `response` event types.
23
+ attr_accessor :response
24
24
 
25
- # Present on the final \"done\" event.
25
+ # Unique request identifier. Present on most events; always present on `usage`.
26
26
  attr_accessor :request_id
27
27
 
28
- # Present on the final \"done\" event.
28
+ # Model identifier. Present on `response` and `reasoning` events (prompt stream).
29
29
  attr_accessor :model
30
30
 
31
- # Tool name (present for \"tool_start\" / \"tool_end\").
32
- attr_accessor :tool_name
31
+ # Per-chunk boolean flag on `response` and `reasoning` events (agent stream). Not a terminal event type — use the `usage` event to detect end of stream.
32
+ attr_accessor :done
33
33
 
34
- # Serialised JSON tool input (present for \"tool_start\").
34
+ # Unique tool invocation identifier. Present for `tool` events.
35
+ attr_accessor :tool_id
36
+
37
+ # Tool name. Present for `tool` events (e.g. \"google_search\").
38
+ attr_accessor :tool
39
+
40
+ # Internal tool type identifier. Present for `tool` events.
41
+ attr_accessor :tool_type
42
+
43
+ # Parsed tool input arguments. Present for `tool` events.
35
44
  attr_accessor :tool_input
36
45
 
37
- # Serialised JSON tool result (present for \"tool_end\").
46
+ # Serialised JSON tool result. Present for `tool` events.
38
47
  attr_accessor :observation
39
48
 
40
- # Error message (present for \"error\" events).
49
+ # Reason the stream ended. Present on `usage` events (e.g. \"completed\").
50
+ attr_accessor :stop_reason
51
+
52
+ # Compressed summary of the prior conversation. Present for `summary` events.
53
+ attr_accessor :summary_text
54
+
55
+ # Token count before summarization. Present for `summary` events.
56
+ attr_accessor :original_token_count
57
+
58
+ # Model context window size. Present for `summary` events.
59
+ attr_accessor :context_limit
60
+
61
+ # LLM provider used for summarization. Present for `summary` events.
62
+ attr_accessor :provider
63
+
64
+ # Error message. Present for `error` events.
41
65
  attr_accessor :error
42
66
 
43
67
  attr_accessor :usage
@@ -46,12 +70,20 @@ module FetchHive::Generated
46
70
  def self.attribute_map
47
71
  {
48
72
  :'type' => :'type',
49
- :'content' => :'content',
73
+ :'response' => :'response',
50
74
  :'request_id' => :'request_id',
51
75
  :'model' => :'model',
52
- :'tool_name' => :'tool_name',
76
+ :'done' => :'done',
77
+ :'tool_id' => :'tool_id',
78
+ :'tool' => :'tool',
79
+ :'tool_type' => :'tool_type',
53
80
  :'tool_input' => :'tool_input',
54
81
  :'observation' => :'observation',
82
+ :'stop_reason' => :'stop_reason',
83
+ :'summary_text' => :'summary_text',
84
+ :'original_token_count' => :'original_token_count',
85
+ :'context_limit' => :'context_limit',
86
+ :'provider' => :'provider',
55
87
  :'error' => :'error',
56
88
  :'usage' => :'usage'
57
89
  }
@@ -71,12 +103,20 @@ module FetchHive::Generated
71
103
  def self.openapi_types
72
104
  {
73
105
  :'type' => :'String',
74
- :'content' => :'String',
106
+ :'response' => :'String',
75
107
  :'request_id' => :'String',
76
108
  :'model' => :'String',
77
- :'tool_name' => :'String',
78
- :'tool_input' => :'String',
109
+ :'done' => :'Boolean',
110
+ :'tool_id' => :'String',
111
+ :'tool' => :'String',
112
+ :'tool_type' => :'String',
113
+ :'tool_input' => :'Hash<String, Object>',
79
114
  :'observation' => :'String',
115
+ :'stop_reason' => :'String',
116
+ :'summary_text' => :'String',
117
+ :'original_token_count' => :'Integer',
118
+ :'context_limit' => :'Integer',
119
+ :'provider' => :'String',
80
120
  :'error' => :'String',
81
121
  :'usage' => :'TokenUsage'
82
122
  }
@@ -108,8 +148,8 @@ module FetchHive::Generated
108
148
  self.type = attributes[:'type']
109
149
  end
110
150
 
111
- if attributes.key?(:'content')
112
- self.content = attributes[:'content']
151
+ if attributes.key?(:'response')
152
+ self.response = attributes[:'response']
113
153
  end
114
154
 
115
155
  if attributes.key?(:'request_id')
@@ -120,18 +160,52 @@ module FetchHive::Generated
120
160
  self.model = attributes[:'model']
121
161
  end
122
162
 
123
- if attributes.key?(:'tool_name')
124
- self.tool_name = attributes[:'tool_name']
163
+ if attributes.key?(:'done')
164
+ self.done = attributes[:'done']
165
+ end
166
+
167
+ if attributes.key?(:'tool_id')
168
+ self.tool_id = attributes[:'tool_id']
169
+ end
170
+
171
+ if attributes.key?(:'tool')
172
+ self.tool = attributes[:'tool']
173
+ end
174
+
175
+ if attributes.key?(:'tool_type')
176
+ self.tool_type = attributes[:'tool_type']
125
177
  end
126
178
 
127
179
  if attributes.key?(:'tool_input')
128
- self.tool_input = attributes[:'tool_input']
180
+ if (value = attributes[:'tool_input']).is_a?(Hash)
181
+ self.tool_input = value
182
+ end
129
183
  end
130
184
 
131
185
  if attributes.key?(:'observation')
132
186
  self.observation = attributes[:'observation']
133
187
  end
134
188
 
189
+ if attributes.key?(:'stop_reason')
190
+ self.stop_reason = attributes[:'stop_reason']
191
+ end
192
+
193
+ if attributes.key?(:'summary_text')
194
+ self.summary_text = attributes[:'summary_text']
195
+ end
196
+
197
+ if attributes.key?(:'original_token_count')
198
+ self.original_token_count = attributes[:'original_token_count']
199
+ end
200
+
201
+ if attributes.key?(:'context_limit')
202
+ self.context_limit = attributes[:'context_limit']
203
+ end
204
+
205
+ if attributes.key?(:'provider')
206
+ self.provider = attributes[:'provider']
207
+ end
208
+
135
209
  if attributes.key?(:'error')
136
210
  self.error = attributes[:'error']
137
211
  end
@@ -162,12 +236,20 @@ module FetchHive::Generated
162
236
  return true if self.equal?(o)
163
237
  self.class == o.class &&
164
238
  type == o.type &&
165
- content == o.content &&
239
+ response == o.response &&
166
240
  request_id == o.request_id &&
167
241
  model == o.model &&
168
- tool_name == o.tool_name &&
242
+ done == o.done &&
243
+ tool_id == o.tool_id &&
244
+ tool == o.tool &&
245
+ tool_type == o.tool_type &&
169
246
  tool_input == o.tool_input &&
170
247
  observation == o.observation &&
248
+ stop_reason == o.stop_reason &&
249
+ summary_text == o.summary_text &&
250
+ original_token_count == o.original_token_count &&
251
+ context_limit == o.context_limit &&
252
+ provider == o.provider &&
171
253
  error == o.error &&
172
254
  usage == o.usage
173
255
  end
@@ -181,7 +263,7 @@ module FetchHive::Generated
181
263
  # Calculates hash code according to all attributes.
182
264
  # @return [Integer] Hash code
183
265
  def hash
184
- [type, content, request_id, model, tool_name, tool_input, observation, error, usage].hash
266
+ [type, response, request_id, model, done, tool_id, tool, tool_type, tool_input, observation, stop_reason, summary_text, original_token_count, context_limit, provider, error, usage].hash
185
267
  end
186
268
 
187
269
  # Builds the object from hash
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.3
6
+ The version of the OpenAPI document: 0.2.4
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -9,7 +9,10 @@ module FetchHive
9
9
  #
10
10
  # io = response.body # any IO or string
11
11
  # FetchHive::Streaming.parse_sse(io) do |event|
12
- # puts event["content"] if event["type"] == "delta"
12
+ # case event["type"]
13
+ # when "response" then print event["response"]
14
+ # when "usage" then puts "\nUsage: #{event['usage']}"
15
+ # end
13
16
  # end
14
17
  #
15
18
  module Streaming
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fetch_hive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fetch Hive