Skip to content

Commit 7b1ecf7

Browse files
fix: correct vision API request format in tests
- Use image_base64 field instead of image - Add required mode field (analyze) - Fix for all platforms (Linux, Windows, macOS)
1 parent 2586bc3 commit 7b1ecf7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/test-release-binaries.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
base64_image=$(base64 -w 0 test-image.jpg)
6464
response=$(curl -s -X POST http://127.0.0.1:11435/api/vision \
6565
-H "Content-Type: application/json" \
66-
-d "{\"prompt\":\"What is in this image?\",\"image\":\"data:image/jpeg;base64,$base64_image\",\"max_tokens\":50}")
66+
-d "{\"mode\":\"analyze\",\"image_base64\":\"$base64_image\",\"timeout_ms\":30000}")
6767
6868
echo "Vision API response: $response"
6969
@@ -150,7 +150,7 @@ jobs:
150150
base64_image=$(base64 -w 0 test-image.jpg)
151151
response=$(curl -s -X POST http://127.0.0.1:11435/api/vision \
152152
-H "Content-Type: application/json" \
153-
-d "{\"prompt\":\"What is in this image?\",\"image\":\"data:image/jpeg;base64,$base64_image\",\"max_tokens\":50}")
153+
-d "{\"mode\":\"analyze\",\"image_base64\":\"$base64_image\",\"timeout_ms\":30000}")
154154
155155
echo "Vision API response: $response"
156156
@@ -209,7 +209,7 @@ jobs:
209209
base64_image=$(base64 test-image.jpg | tr -d '\n')
210210
response=$(curl -s -X POST http://127.0.0.1:11435/api/vision \
211211
-H "Content-Type: application/json" \
212-
-d "{\"prompt\":\"What is in this image?\",\"image\":\"data:image/jpeg;base64,$base64_image\",\"max_tokens\":50}")
212+
-d "{\"mode\":\"analyze\",\"image_base64\":\"$base64_image\",\"timeout_ms\":30000}")
213213
214214
echo "Vision API response: $response"
215215
@@ -267,7 +267,7 @@ jobs:
267267
base64_image=$(base64 test-image.jpg | tr -d '\n')
268268
response=$(curl -s -X POST http://127.0.0.1:11435/api/vision \
269269
-H "Content-Type: application/json" \
270-
-d "{\"prompt\":\"What is in this image?\",\"image\":\"data:image/jpeg;base64,$base64_image\",\"max_tokens\":50}")
270+
-d "{\"mode\":\"analyze\",\"image_base64\":\"$base64_image\",\"timeout_ms\":30000}")
271271
272272
echo "Vision API response: $response"
273273

0 commit comments

Comments
 (0)