ruby_llm-providers-qiniu 0.1.1
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 +7 -0
- data/.flayignore +1 -0
- data/.github/workflows/ci.yml +28 -0
- data/.github/workflows/gitleaks.yml +23 -0
- data/.github/workflows/release.yml +36 -0
- data/.overcommit.yml +31 -0
- data/.rspec +2 -0
- data/.rubocop.yml +29 -0
- data/Archspec.rb +14 -0
- data/LICENSE +21 -0
- data/README.md +114 -0
- data/lib/ruby_llm/providers/qiniu.rb +134 -0
- data/models.json +859 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_anthropic_claude_sonnet_5_can_handle_a_multi_turn_conversation.yml +154 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_anthropic_claude_sonnet_5_can_have_a_basic_conversation.yml +61 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_anthropic_claude_sonnet_5_can_use_tools.yml +121 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_anthropic_claude_sonnet_5_returns_structured_output.yml +62 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_anthropic_claude_sonnet_5_returns_the_raw_response.yml +66 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_anthropic_claude_sonnet_5_supports_streaming_responses.yml +105 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_deepseek_deepseek_v4_1_flash_can_handle_a_multi_turn_conversation.yml +127 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_deepseek_deepseek_v4_1_flash_can_have_a_basic_conversation.yml +58 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_deepseek_deepseek_v4_1_flash_can_use_tools.yml +119 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_deepseek_deepseek_v4_1_flash_returns_structured_output.yml +59 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_deepseek_deepseek_v4_1_flash_returns_the_raw_response.yml +58 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_deepseek_deepseek_v4_1_flash_supports_streaming_responses.yml +89 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_gemini_3_1_flash_lite_preview_can_handle_a_multi_turn_conversation.yml +195 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_gemini_3_1_flash_lite_preview_can_have_a_basic_conversation.yml +96 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_gemini_3_1_flash_lite_preview_can_use_tools.yml +165 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_gemini_3_1_flash_lite_preview_returns_structured_output.yml +97 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_gemini_3_1_flash_lite_preview_returns_the_raw_response.yml +97 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_gemini_3_1_flash_lite_preview_supports_streaming_responses.yml +70 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_1_flash_lite_can_handle_a_multi_turn_conversation.yml +194 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_1_flash_lite_can_have_a_basic_conversation.yml +96 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_1_flash_lite_can_use_tools.yml +165 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_1_flash_lite_returns_structured_output.yml +97 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_1_flash_lite_returns_the_raw_response.yml +97 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_1_flash_lite_supports_streaming_responses.yml +70 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_8_flash_can_handle_a_multi_turn_conversation.yml +199 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_8_flash_can_have_a_basic_conversation.yml +97 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_8_flash_can_use_tools.yml +166 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_8_flash_returns_structured_output.yml +98 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_8_flash_returns_the_raw_response.yml +98 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_8_flash_supports_streaming_responses.yml +71 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_2_can_handle_a_multi_turn_conversation.yml +419 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_2_can_have_a_basic_conversation.yml +210 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_2_can_use_tools.yml +468 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_2_returns_structured_output.yml +229 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_2_returns_the_raw_response.yml +210 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_2_supports_streaming_responses.yml +102 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_can_handle_a_multi_turn_conversation.yml +421 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_can_have_a_basic_conversation.yml +157 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_can_use_tools.yml +469 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_mini_can_handle_a_multi_turn_conversation.yml +422 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_mini_can_have_a_basic_conversation.yml +211 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_mini_can_use_tools.yml +469 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_mini_returns_structured_output.yml +230 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_mini_returns_the_raw_response.yml +211 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_mini_supports_streaming_responses.yml +102 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_returns_structured_output.yml +230 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_returns_the_raw_response.yml +157 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_supports_streaming_responses.yml +102 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_6_luna_can_handle_a_multi_turn_conversation.yml +389 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_6_luna_can_have_a_basic_conversation.yml +241 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_6_luna_can_use_tools.yml +437 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_6_luna_returns_structured_output.yml +214 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_6_luna_returns_the_raw_response.yml +241 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_6_luna_supports_streaming_responses.yml +106 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_6_luna_can_handle_a_multi_turn_conversation.yml +389 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_6_luna_can_have_a_basic_conversation.yml +202 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_6_luna_can_use_tools.yml +437 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_6_luna_returns_structured_output.yml +221 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_6_luna_returns_the_raw_response.yml +202 -0
- data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_6_luna_supports_streaming_responses.yml +112 -0
- data/spec/ruby_llm/chat_schema_spec.rb +30 -0
- data/spec/ruby_llm/chat_spec.rb +35 -0
- data/spec/ruby_llm/chat_streaming_spec.rb +22 -0
- data/spec/ruby_llm/chat_tools_spec.rb +32 -0
- data/spec/ruby_llm/embedding_spec.rb +49 -0
- data/spec/ruby_llm/image_spec.rb +23 -0
- data/spec/ruby_llm/models_spec.rb +11 -0
- data/spec/ruby_llm/moderation_spec.rb +22 -0
- data/spec/ruby_llm/providers/qiniu_spec.rb +103 -0
- data/spec/ruby_llm/rerank_spec.rb +23 -0
- data/spec/ruby_llm/speech_spec.rb +25 -0
- data/spec/ruby_llm/video_spec.rb +27 -0
- data/spec/spec_helper.rb +26 -0
- data/spec/support/models.rb +30 -0
- data/spec/support/rubyllm_configuration.rb +14 -0
- data/spec/support/vcr_configuration.rb +16 -0
- metadata +147 -0
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: "<QINIU_BASE_URL>/bypass/openai/v1/responses"
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
8
|
+
string: '{"model":"openai/gpt-5.4-mini","input":[{"role":"user","content":"What''s
|
|
9
|
+
the weather in Berlin? Use 52.5200, 13.4050."}],"stream":false,"store":false,"include":["reasoning.encrypted_content"],"tools":[{"type":"function","name":"weather","description":"Gets
|
|
10
|
+
current weather for a location","parameters":{"type":"object","properties":{"latitude":{"type":"string","description":"Latitude"},"longitude":{"type":"string","description":"Longitude"}},"required":["latitude","longitude"],"additionalProperties":false,"strict":true},"strict":false}]}'
|
|
11
|
+
headers:
|
|
12
|
+
User-Agent:
|
|
13
|
+
- Faraday v2.14.4
|
|
14
|
+
Authorization:
|
|
15
|
+
- Bearer <AUTH_TOKEN>
|
|
16
|
+
Content-Type:
|
|
17
|
+
- application/json
|
|
18
|
+
Accept-Encoding:
|
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
20
|
+
Accept:
|
|
21
|
+
- "*/*"
|
|
22
|
+
response:
|
|
23
|
+
status:
|
|
24
|
+
code: 200
|
|
25
|
+
message: OK
|
|
26
|
+
headers:
|
|
27
|
+
Content-Type:
|
|
28
|
+
- application/json; charset=utf-8
|
|
29
|
+
Access-Control-Allow-Credentials:
|
|
30
|
+
- 'true'
|
|
31
|
+
Access-Control-Allow-Headers:
|
|
32
|
+
- ''
|
|
33
|
+
Access-Control-Allow-Methods:
|
|
34
|
+
- GET, POST, PUT, PATCH, DELETE, OPTIONS
|
|
35
|
+
Access-Control-Allow-Origin:
|
|
36
|
+
- ''
|
|
37
|
+
Access-Control-Expose-Headers:
|
|
38
|
+
- Http_x_reqid
|
|
39
|
+
Http-X-Reqid:
|
|
40
|
+
- chatptrsp-a7bface053994f658f6f55f7c8abe4a3
|
|
41
|
+
Request-Id:
|
|
42
|
+
- 824dbc6d-77a6-462b-8595-34bc157834ed
|
|
43
|
+
X-Request-Id:
|
|
44
|
+
- 824dbc6d-77a6-462b-8595-34bc157834ed
|
|
45
|
+
Server:
|
|
46
|
+
- APISIX
|
|
47
|
+
Cache-Control:
|
|
48
|
+
- no-cache
|
|
49
|
+
Transfer-Encoding:
|
|
50
|
+
- chunked
|
|
51
|
+
Connection:
|
|
52
|
+
- keep-alive
|
|
53
|
+
Date:
|
|
54
|
+
- Mon, 28 Sep 2026 08:15:25 GMT
|
|
55
|
+
Eo-Log-Uuid:
|
|
56
|
+
- '18007803903831686326'
|
|
57
|
+
Eo-Cache-Status:
|
|
58
|
+
- MISS
|
|
59
|
+
body:
|
|
60
|
+
encoding: UTF-8
|
|
61
|
+
string: |-
|
|
62
|
+
{
|
|
63
|
+
"id": "resp_0ebd6ca925fd24bc016aba221e534881938499bae51088a0ee",
|
|
64
|
+
"object": "response",
|
|
65
|
+
"created_at": 1790583326,
|
|
66
|
+
"status": "completed",
|
|
67
|
+
"background": false,
|
|
68
|
+
"completed_at": 1790583327,
|
|
69
|
+
"content_filters": [
|
|
70
|
+
{
|
|
71
|
+
"blocked": false,
|
|
72
|
+
"source_type": "prompt",
|
|
73
|
+
"content_filter_raw": [],
|
|
74
|
+
"content_filter_results": {
|
|
75
|
+
"hate": {
|
|
76
|
+
"filtered": false,
|
|
77
|
+
"severity": "safe"
|
|
78
|
+
},
|
|
79
|
+
"sexual": {
|
|
80
|
+
"filtered": false,
|
|
81
|
+
"severity": "safe"
|
|
82
|
+
},
|
|
83
|
+
"violence": {
|
|
84
|
+
"filtered": false,
|
|
85
|
+
"severity": "safe"
|
|
86
|
+
},
|
|
87
|
+
"self_harm": {
|
|
88
|
+
"filtered": false,
|
|
89
|
+
"severity": "safe"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"content_filter_offsets": {
|
|
93
|
+
"start_offset": 0,
|
|
94
|
+
"end_offset": 84,
|
|
95
|
+
"check_offset": 0
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"blocked": false,
|
|
100
|
+
"source_type": "completion",
|
|
101
|
+
"content_filter_raw": [],
|
|
102
|
+
"content_filter_results": {
|
|
103
|
+
"hate": {
|
|
104
|
+
"filtered": false,
|
|
105
|
+
"severity": "safe"
|
|
106
|
+
},
|
|
107
|
+
"sexual": {
|
|
108
|
+
"filtered": false,
|
|
109
|
+
"severity": "safe"
|
|
110
|
+
},
|
|
111
|
+
"violence": {
|
|
112
|
+
"filtered": false,
|
|
113
|
+
"severity": "safe"
|
|
114
|
+
},
|
|
115
|
+
"self_harm": {
|
|
116
|
+
"filtered": false,
|
|
117
|
+
"severity": "safe"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"content_filter_offsets": {
|
|
121
|
+
"start_offset": 0,
|
|
122
|
+
"end_offset": 44,
|
|
123
|
+
"check_offset": 0
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"error": null,
|
|
128
|
+
"frequency_penalty": 0.0,
|
|
129
|
+
"incomplete_details": null,
|
|
130
|
+
"instructions": null,
|
|
131
|
+
"max_output_tokens": null,
|
|
132
|
+
"max_tool_calls": null,
|
|
133
|
+
"model": "openai/gpt-5.4-mini",
|
|
134
|
+
"moderation": null,
|
|
135
|
+
"output": [
|
|
136
|
+
{
|
|
137
|
+
"id": "fc_0ebd6ca925fd24bc016aba221f17e88193834a4df5f6df298f",
|
|
138
|
+
"type": "function_call",
|
|
139
|
+
"status": "completed",
|
|
140
|
+
"arguments": "{\"latitude\":\"52.5200\",\"longitude\":\"13.4050\"}",
|
|
141
|
+
"call_id": "call_vTstMqeiCoACfpPKurJFIJLl",
|
|
142
|
+
"name": "weather"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"parallel_tool_calls": true,
|
|
146
|
+
"presence_penalty": 0.0,
|
|
147
|
+
"previous_response_id": null,
|
|
148
|
+
"prompt_cache_key": null,
|
|
149
|
+
"prompt_cache_retention": "in_memory",
|
|
150
|
+
"reasoning": {
|
|
151
|
+
"context": "current_turn",
|
|
152
|
+
"effort": "none",
|
|
153
|
+
"mode": "standard",
|
|
154
|
+
"summary": null
|
|
155
|
+
},
|
|
156
|
+
"safety_identifier": null,
|
|
157
|
+
"service_tier": "default",
|
|
158
|
+
"store": false,
|
|
159
|
+
"temperature": 1.0,
|
|
160
|
+
"text": {
|
|
161
|
+
"format": {
|
|
162
|
+
"type": "text"
|
|
163
|
+
},
|
|
164
|
+
"verbosity": "medium"
|
|
165
|
+
},
|
|
166
|
+
"tool_choice": "auto",
|
|
167
|
+
"tool_usage": {
|
|
168
|
+
"image_gen": {
|
|
169
|
+
"input_tokens": 0,
|
|
170
|
+
"input_tokens_details": {
|
|
171
|
+
"image_tokens": 0,
|
|
172
|
+
"text_tokens": 0
|
|
173
|
+
},
|
|
174
|
+
"output_tokens": 0,
|
|
175
|
+
"output_tokens_details": {
|
|
176
|
+
"image_tokens": 0,
|
|
177
|
+
"text_tokens": 0
|
|
178
|
+
},
|
|
179
|
+
"total_tokens": 0
|
|
180
|
+
},
|
|
181
|
+
"web_search": {
|
|
182
|
+
"num_requests": 0
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"tools": [
|
|
186
|
+
{
|
|
187
|
+
"type": "function",
|
|
188
|
+
"description": "Gets current weather for a location",
|
|
189
|
+
"name": "weather",
|
|
190
|
+
"output_schema": null,
|
|
191
|
+
"parameters": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"properties": {
|
|
194
|
+
"latitude": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"description": "Latitude"
|
|
197
|
+
},
|
|
198
|
+
"longitude": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"description": "Longitude"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"required": [
|
|
204
|
+
"latitude",
|
|
205
|
+
"longitude"
|
|
206
|
+
],
|
|
207
|
+
"additionalProperties": false,
|
|
208
|
+
"strict": true
|
|
209
|
+
},
|
|
210
|
+
"strict": false
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"top_logprobs": 0,
|
|
214
|
+
"top_p": 0.98,
|
|
215
|
+
"truncation": "disabled",
|
|
216
|
+
"usage": {
|
|
217
|
+
"input_tokens": 70,
|
|
218
|
+
"input_tokens_details": {
|
|
219
|
+
"cache_write_tokens": 0,
|
|
220
|
+
"cached_tokens": 0
|
|
221
|
+
},
|
|
222
|
+
"output_tokens": 27,
|
|
223
|
+
"output_tokens_details": {
|
|
224
|
+
"reasoning_tokens": 0
|
|
225
|
+
},
|
|
226
|
+
"total_tokens": 97
|
|
227
|
+
},
|
|
228
|
+
"user": null,
|
|
229
|
+
"metadata": {}
|
|
230
|
+
}
|
|
231
|
+
recorded_at: Mon, 28 Sep 2026 08:15:27 GMT
|
|
232
|
+
- request:
|
|
233
|
+
method: post
|
|
234
|
+
uri: "<QINIU_BASE_URL>/bypass/openai/v1/responses"
|
|
235
|
+
body:
|
|
236
|
+
encoding: UTF-8
|
|
237
|
+
string: '{"model":"openai/gpt-5.4-mini","input":[{"role":"user","content":"What''s
|
|
238
|
+
the weather in Berlin? Use 52.5200, 13.4050."},{"type":"function_call","call_id":"call_vTstMqeiCoACfpPKurJFIJLl","name":"weather","arguments":"{\"latitude\":\"52.5200\",\"longitude\":\"13.4050\"}"},{"type":"function_call_output","call_id":"call_vTstMqeiCoACfpPKurJFIJLl","output":"Current
|
|
239
|
+
weather at 52.5200, 13.4050: 15°C, Wind: 10 km/h"}],"stream":false,"store":false,"include":["reasoning.encrypted_content"],"tools":[{"type":"function","name":"weather","description":"Gets
|
|
240
|
+
current weather for a location","parameters":{"type":"object","properties":{"latitude":{"type":"string","description":"Latitude"},"longitude":{"type":"string","description":"Longitude"}},"required":["latitude","longitude"],"additionalProperties":false,"strict":true},"strict":false}]}'
|
|
241
|
+
headers:
|
|
242
|
+
User-Agent:
|
|
243
|
+
- Faraday v2.14.4
|
|
244
|
+
Authorization:
|
|
245
|
+
- Bearer <AUTH_TOKEN>
|
|
246
|
+
Content-Type:
|
|
247
|
+
- application/json
|
|
248
|
+
Accept-Encoding:
|
|
249
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
250
|
+
Accept:
|
|
251
|
+
- "*/*"
|
|
252
|
+
response:
|
|
253
|
+
status:
|
|
254
|
+
code: 200
|
|
255
|
+
message: OK
|
|
256
|
+
headers:
|
|
257
|
+
Content-Type:
|
|
258
|
+
- application/json; charset=utf-8
|
|
259
|
+
Access-Control-Allow-Credentials:
|
|
260
|
+
- 'true'
|
|
261
|
+
Access-Control-Allow-Headers:
|
|
262
|
+
- ''
|
|
263
|
+
Access-Control-Allow-Methods:
|
|
264
|
+
- GET, POST, PUT, PATCH, DELETE, OPTIONS
|
|
265
|
+
Access-Control-Allow-Origin:
|
|
266
|
+
- ''
|
|
267
|
+
Access-Control-Expose-Headers:
|
|
268
|
+
- Http_x_reqid
|
|
269
|
+
Http-X-Reqid:
|
|
270
|
+
- chatptrsp-c44dcbac083f4f86938a67c775bb7379
|
|
271
|
+
Request-Id:
|
|
272
|
+
- b2d7529c-e372-4813-9d76-44492e615cad
|
|
273
|
+
X-Request-Id:
|
|
274
|
+
- b2d7529c-e372-4813-9d76-44492e615cad
|
|
275
|
+
Server:
|
|
276
|
+
- APISIX
|
|
277
|
+
Cache-Control:
|
|
278
|
+
- no-cache
|
|
279
|
+
Transfer-Encoding:
|
|
280
|
+
- chunked
|
|
281
|
+
Connection:
|
|
282
|
+
- keep-alive
|
|
283
|
+
Date:
|
|
284
|
+
- Mon, 28 Sep 2026 08:15:27 GMT
|
|
285
|
+
Eo-Log-Uuid:
|
|
286
|
+
- '1144679473187554921'
|
|
287
|
+
Eo-Cache-Status:
|
|
288
|
+
- MISS
|
|
289
|
+
body:
|
|
290
|
+
encoding: UTF-8
|
|
291
|
+
string: |-
|
|
292
|
+
{
|
|
293
|
+
"id": "resp_009e906656952551016aba2220bfa481979599345926ca0020",
|
|
294
|
+
"object": "response",
|
|
295
|
+
"created_at": 1790583328,
|
|
296
|
+
"status": "completed",
|
|
297
|
+
"background": false,
|
|
298
|
+
"completed_at": 1790583330,
|
|
299
|
+
"content_filters": [
|
|
300
|
+
{
|
|
301
|
+
"blocked": false,
|
|
302
|
+
"source_type": "prompt",
|
|
303
|
+
"content_filter_raw": [],
|
|
304
|
+
"content_filter_results": {
|
|
305
|
+
"hate": {
|
|
306
|
+
"filtered": false,
|
|
307
|
+
"severity": "safe"
|
|
308
|
+
},
|
|
309
|
+
"sexual": {
|
|
310
|
+
"filtered": false,
|
|
311
|
+
"severity": "safe"
|
|
312
|
+
},
|
|
313
|
+
"violence": {
|
|
314
|
+
"filtered": false,
|
|
315
|
+
"severity": "safe"
|
|
316
|
+
},
|
|
317
|
+
"self_harm": {
|
|
318
|
+
"filtered": false,
|
|
319
|
+
"severity": "safe"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"content_filter_offsets": {
|
|
323
|
+
"start_offset": 0,
|
|
324
|
+
"end_offset": 173,
|
|
325
|
+
"check_offset": 0
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"blocked": false,
|
|
330
|
+
"source_type": "completion",
|
|
331
|
+
"content_filter_raw": [],
|
|
332
|
+
"content_filter_results": {
|
|
333
|
+
"hate": {
|
|
334
|
+
"filtered": false,
|
|
335
|
+
"severity": "safe"
|
|
336
|
+
},
|
|
337
|
+
"sexual": {
|
|
338
|
+
"filtered": false,
|
|
339
|
+
"severity": "safe"
|
|
340
|
+
},
|
|
341
|
+
"violence": {
|
|
342
|
+
"filtered": false,
|
|
343
|
+
"severity": "safe"
|
|
344
|
+
},
|
|
345
|
+
"self_harm": {
|
|
346
|
+
"filtered": false,
|
|
347
|
+
"severity": "safe"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"content_filter_offsets": {
|
|
351
|
+
"start_offset": 0,
|
|
352
|
+
"end_offset": 54,
|
|
353
|
+
"check_offset": 0
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"error": null,
|
|
358
|
+
"frequency_penalty": 0.0,
|
|
359
|
+
"incomplete_details": null,
|
|
360
|
+
"instructions": null,
|
|
361
|
+
"max_output_tokens": null,
|
|
362
|
+
"max_tool_calls": null,
|
|
363
|
+
"model": "openai/gpt-5.4-mini",
|
|
364
|
+
"moderation": null,
|
|
365
|
+
"output": [
|
|
366
|
+
{
|
|
367
|
+
"id": "msg_009e906656952551016aba2221df948197be60c35b7322662a",
|
|
368
|
+
"type": "message",
|
|
369
|
+
"status": "completed",
|
|
370
|
+
"content": [
|
|
371
|
+
{
|
|
372
|
+
"type": "output_text",
|
|
373
|
+
"annotations": [],
|
|
374
|
+
"logprobs": [],
|
|
375
|
+
"text": "Berlin is currently **15\u00b0C** with **wind at 10 km/h**."
|
|
376
|
+
}
|
|
377
|
+
],
|
|
378
|
+
"phase": "final_answer",
|
|
379
|
+
"role": "assistant"
|
|
380
|
+
}
|
|
381
|
+
],
|
|
382
|
+
"parallel_tool_calls": true,
|
|
383
|
+
"presence_penalty": 0.0,
|
|
384
|
+
"previous_response_id": null,
|
|
385
|
+
"prompt_cache_key": null,
|
|
386
|
+
"prompt_cache_retention": "in_memory",
|
|
387
|
+
"reasoning": {
|
|
388
|
+
"context": "current_turn",
|
|
389
|
+
"effort": "none",
|
|
390
|
+
"mode": "standard",
|
|
391
|
+
"summary": null
|
|
392
|
+
},
|
|
393
|
+
"safety_identifier": null,
|
|
394
|
+
"service_tier": "default",
|
|
395
|
+
"store": false,
|
|
396
|
+
"temperature": 1.0,
|
|
397
|
+
"text": {
|
|
398
|
+
"format": {
|
|
399
|
+
"type": "text"
|
|
400
|
+
},
|
|
401
|
+
"verbosity": "medium"
|
|
402
|
+
},
|
|
403
|
+
"tool_choice": "auto",
|
|
404
|
+
"tool_usage": {
|
|
405
|
+
"image_gen": {
|
|
406
|
+
"input_tokens": 0,
|
|
407
|
+
"input_tokens_details": {
|
|
408
|
+
"image_tokens": 0,
|
|
409
|
+
"text_tokens": 0
|
|
410
|
+
},
|
|
411
|
+
"output_tokens": 0,
|
|
412
|
+
"output_tokens_details": {
|
|
413
|
+
"image_tokens": 0,
|
|
414
|
+
"text_tokens": 0
|
|
415
|
+
},
|
|
416
|
+
"total_tokens": 0
|
|
417
|
+
},
|
|
418
|
+
"web_search": {
|
|
419
|
+
"num_requests": 0
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"tools": [
|
|
423
|
+
{
|
|
424
|
+
"type": "function",
|
|
425
|
+
"description": "Gets current weather for a location",
|
|
426
|
+
"name": "weather",
|
|
427
|
+
"output_schema": null,
|
|
428
|
+
"parameters": {
|
|
429
|
+
"type": "object",
|
|
430
|
+
"properties": {
|
|
431
|
+
"latitude": {
|
|
432
|
+
"type": "string",
|
|
433
|
+
"description": "Latitude"
|
|
434
|
+
},
|
|
435
|
+
"longitude": {
|
|
436
|
+
"type": "string",
|
|
437
|
+
"description": "Longitude"
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"required": [
|
|
441
|
+
"latitude",
|
|
442
|
+
"longitude"
|
|
443
|
+
],
|
|
444
|
+
"additionalProperties": false,
|
|
445
|
+
"strict": true
|
|
446
|
+
},
|
|
447
|
+
"strict": false
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
"top_logprobs": 0,
|
|
451
|
+
"top_p": 0.98,
|
|
452
|
+
"truncation": "disabled",
|
|
453
|
+
"usage": {
|
|
454
|
+
"input_tokens": 132,
|
|
455
|
+
"input_tokens_details": {
|
|
456
|
+
"cache_write_tokens": 0,
|
|
457
|
+
"cached_tokens": 0
|
|
458
|
+
},
|
|
459
|
+
"output_tokens": 21,
|
|
460
|
+
"output_tokens_details": {
|
|
461
|
+
"reasoning_tokens": 0
|
|
462
|
+
},
|
|
463
|
+
"total_tokens": 153
|
|
464
|
+
},
|
|
465
|
+
"user": null,
|
|
466
|
+
"metadata": {}
|
|
467
|
+
}
|
|
468
|
+
recorded_at: Mon, 28 Sep 2026 08:15:30 GMT
|
|
469
|
+
recorded_with: VCR 6.4.0
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: post
|
|
5
|
+
uri: "<QINIU_BASE_URL>/bypass/openai/v1/responses"
|
|
6
|
+
body:
|
|
7
|
+
encoding: UTF-8
|
|
8
|
+
string: '{"model":"openai/gpt-5.4-mini","input":[{"role":"user","content":"Generate
|
|
9
|
+
a person named John who is 30 years old"}],"stream":false,"store":false,"include":["reasoning.encrypted_content"],"text":{"format":{"type":"json_schema","name":"response","schema":{"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}},"required":["name","age"],"additionalProperties":false},"strict":true}}}'
|
|
10
|
+
headers:
|
|
11
|
+
User-Agent:
|
|
12
|
+
- Faraday v2.14.4
|
|
13
|
+
Authorization:
|
|
14
|
+
- Bearer <AUTH_TOKEN>
|
|
15
|
+
Content-Type:
|
|
16
|
+
- application/json
|
|
17
|
+
Accept-Encoding:
|
|
18
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
19
|
+
Accept:
|
|
20
|
+
- "*/*"
|
|
21
|
+
response:
|
|
22
|
+
status:
|
|
23
|
+
code: 200
|
|
24
|
+
message: OK
|
|
25
|
+
headers:
|
|
26
|
+
Content-Type:
|
|
27
|
+
- application/json; charset=utf-8
|
|
28
|
+
Access-Control-Allow-Credentials:
|
|
29
|
+
- 'true'
|
|
30
|
+
Access-Control-Allow-Headers:
|
|
31
|
+
- ''
|
|
32
|
+
Access-Control-Allow-Methods:
|
|
33
|
+
- GET, POST, PUT, PATCH, DELETE, OPTIONS
|
|
34
|
+
Access-Control-Allow-Origin:
|
|
35
|
+
- ''
|
|
36
|
+
Access-Control-Expose-Headers:
|
|
37
|
+
- Http_x_reqid
|
|
38
|
+
Http-X-Reqid:
|
|
39
|
+
- chatptrsp-63cb2c77c8cd48fc98b3609029ed4d37
|
|
40
|
+
Request-Id:
|
|
41
|
+
- 7d1c24b5-1ba3-43fc-b168-313233d26b1b
|
|
42
|
+
X-Request-Id:
|
|
43
|
+
- 7d1c24b5-1ba3-43fc-b168-313233d26b1b
|
|
44
|
+
Server:
|
|
45
|
+
- APISIX
|
|
46
|
+
Cache-Control:
|
|
47
|
+
- no-cache
|
|
48
|
+
Transfer-Encoding:
|
|
49
|
+
- chunked
|
|
50
|
+
Connection:
|
|
51
|
+
- keep-alive
|
|
52
|
+
Date:
|
|
53
|
+
- Mon, 28 Sep 2026 07:53:23 GMT
|
|
54
|
+
Eo-Log-Uuid:
|
|
55
|
+
- '5236159025981496495'
|
|
56
|
+
Eo-Cache-Status:
|
|
57
|
+
- MISS
|
|
58
|
+
body:
|
|
59
|
+
encoding: UTF-8
|
|
60
|
+
string: |-
|
|
61
|
+
{
|
|
62
|
+
"id": "resp_013da9797d040d57016aba1cf4488c81908158e580dbf469e6",
|
|
63
|
+
"object": "response",
|
|
64
|
+
"created_at": 1790582004,
|
|
65
|
+
"status": "completed",
|
|
66
|
+
"background": false,
|
|
67
|
+
"completed_at": 1790582005,
|
|
68
|
+
"content_filters": [
|
|
69
|
+
{
|
|
70
|
+
"blocked": false,
|
|
71
|
+
"source_type": "prompt",
|
|
72
|
+
"content_filter_raw": [],
|
|
73
|
+
"content_filter_results": {
|
|
74
|
+
"hate": {
|
|
75
|
+
"filtered": false,
|
|
76
|
+
"severity": "safe"
|
|
77
|
+
},
|
|
78
|
+
"sexual": {
|
|
79
|
+
"filtered": false,
|
|
80
|
+
"severity": "safe"
|
|
81
|
+
},
|
|
82
|
+
"violence": {
|
|
83
|
+
"filtered": false,
|
|
84
|
+
"severity": "safe"
|
|
85
|
+
},
|
|
86
|
+
"self_harm": {
|
|
87
|
+
"filtered": false,
|
|
88
|
+
"severity": "safe"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"content_filter_offsets": {
|
|
92
|
+
"start_offset": 0,
|
|
93
|
+
"end_offset": 1021,
|
|
94
|
+
"check_offset": 0
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"blocked": false,
|
|
99
|
+
"source_type": "completion",
|
|
100
|
+
"content_filter_raw": [],
|
|
101
|
+
"content_filter_results": {
|
|
102
|
+
"hate": {
|
|
103
|
+
"filtered": false,
|
|
104
|
+
"severity": "safe"
|
|
105
|
+
},
|
|
106
|
+
"sexual": {
|
|
107
|
+
"filtered": false,
|
|
108
|
+
"severity": "safe"
|
|
109
|
+
},
|
|
110
|
+
"violence": {
|
|
111
|
+
"filtered": false,
|
|
112
|
+
"severity": "safe"
|
|
113
|
+
},
|
|
114
|
+
"self_harm": {
|
|
115
|
+
"filtered": false,
|
|
116
|
+
"severity": "safe"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"content_filter_offsets": {
|
|
120
|
+
"start_offset": 0,
|
|
121
|
+
"end_offset": 24,
|
|
122
|
+
"check_offset": 0
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"error": null,
|
|
127
|
+
"frequency_penalty": 0.0,
|
|
128
|
+
"incomplete_details": null,
|
|
129
|
+
"instructions": null,
|
|
130
|
+
"max_output_tokens": null,
|
|
131
|
+
"max_tool_calls": null,
|
|
132
|
+
"model": "openai/gpt-5.4-mini",
|
|
133
|
+
"moderation": null,
|
|
134
|
+
"output": [
|
|
135
|
+
{
|
|
136
|
+
"id": "msg_013da9797d040d57016aba1cf4e47c81908163e4b179b7e6b3",
|
|
137
|
+
"type": "message",
|
|
138
|
+
"status": "completed",
|
|
139
|
+
"content": [
|
|
140
|
+
{
|
|
141
|
+
"type": "output_text",
|
|
142
|
+
"annotations": [],
|
|
143
|
+
"logprobs": [],
|
|
144
|
+
"text": "{\"name\":\"John\",\"age\":30}"
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"phase": "final_answer",
|
|
148
|
+
"role": "assistant"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"parallel_tool_calls": true,
|
|
152
|
+
"presence_penalty": 0.0,
|
|
153
|
+
"previous_response_id": null,
|
|
154
|
+
"prompt_cache_key": null,
|
|
155
|
+
"prompt_cache_retention": "in_memory",
|
|
156
|
+
"reasoning": {
|
|
157
|
+
"context": "current_turn",
|
|
158
|
+
"effort": "none",
|
|
159
|
+
"mode": "standard",
|
|
160
|
+
"summary": null
|
|
161
|
+
},
|
|
162
|
+
"safety_identifier": null,
|
|
163
|
+
"service_tier": "default",
|
|
164
|
+
"store": false,
|
|
165
|
+
"temperature": 1.0,
|
|
166
|
+
"text": {
|
|
167
|
+
"format": {
|
|
168
|
+
"type": "json_schema",
|
|
169
|
+
"description": null,
|
|
170
|
+
"name": "response",
|
|
171
|
+
"schema": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"properties": {
|
|
174
|
+
"name": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
},
|
|
177
|
+
"age": {
|
|
178
|
+
"type": "integer"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"required": [
|
|
182
|
+
"name",
|
|
183
|
+
"age"
|
|
184
|
+
],
|
|
185
|
+
"additionalProperties": false
|
|
186
|
+
},
|
|
187
|
+
"strict": true
|
|
188
|
+
},
|
|
189
|
+
"verbosity": "medium"
|
|
190
|
+
},
|
|
191
|
+
"tool_choice": "auto",
|
|
192
|
+
"tool_usage": {
|
|
193
|
+
"image_gen": {
|
|
194
|
+
"input_tokens": 0,
|
|
195
|
+
"input_tokens_details": {
|
|
196
|
+
"image_tokens": 0,
|
|
197
|
+
"text_tokens": 0
|
|
198
|
+
},
|
|
199
|
+
"output_tokens": 0,
|
|
200
|
+
"output_tokens_details": {
|
|
201
|
+
"image_tokens": 0,
|
|
202
|
+
"text_tokens": 0
|
|
203
|
+
},
|
|
204
|
+
"total_tokens": 0
|
|
205
|
+
},
|
|
206
|
+
"web_search": {
|
|
207
|
+
"num_requests": 0
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"tools": [],
|
|
211
|
+
"top_logprobs": 0,
|
|
212
|
+
"top_p": 0.98,
|
|
213
|
+
"truncation": "disabled",
|
|
214
|
+
"usage": {
|
|
215
|
+
"input_tokens": 45,
|
|
216
|
+
"input_tokens_details": {
|
|
217
|
+
"cache_write_tokens": 0,
|
|
218
|
+
"cached_tokens": 0
|
|
219
|
+
},
|
|
220
|
+
"output_tokens": 16,
|
|
221
|
+
"output_tokens_details": {
|
|
222
|
+
"reasoning_tokens": 0
|
|
223
|
+
},
|
|
224
|
+
"total_tokens": 61
|
|
225
|
+
},
|
|
226
|
+
"user": null,
|
|
227
|
+
"metadata": {}
|
|
228
|
+
}
|
|
229
|
+
recorded_at: Mon, 28 Sep 2026 07:53:26 GMT
|
|
230
|
+
recorded_with: VCR 6.4.0
|