seacloud-sdk 0.12.0 → 0.12.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.
package/dist/index.d.ts CHANGED
@@ -12420,7 +12420,7 @@ declare function llmChatCompletions(params: LlmChatCompletionsParams & {
12420
12420
  * - For tool calls (image/video generation), streaming is RECOMMENDED
12421
12421
  *
12422
12422
  * 4. AUTHENTICATION:
12423
- * - Requires 'X-Project' header (configured via initSeacloud({ xProject: 'SeaArt' }))
12423
+ * - Requires 'X-Project' header (configured via initSeacloud({ xProject: 'SeaVerse' }))
12424
12424
  * - Uses Bearer token authentication
12425
12425
  *
12426
12426
  * 5. SESSION MANAGEMENT:
package/dist/index.js CHANGED
@@ -1598,10 +1598,17 @@ async function googleGeminiImage(params) {
1598
1598
  pollingOptions
1599
1599
  );
1600
1600
  const resources = [];
1601
+ let firstTextResource = null;
1601
1602
  if (result.output) {
1602
1603
  for (const item of result.output) {
1603
1604
  if (item.content) {
1604
1605
  for (const resource of item.content) {
1606
+ if (resource.type === "text") {
1607
+ if (!firstTextResource) {
1608
+ firstTextResource = resource;
1609
+ }
1610
+ continue;
1611
+ }
1605
1612
  validateResourceUrl(resource, "image");
1606
1613
  resources.push({
1607
1614
  type: resource.type || "unknown",
@@ -1614,6 +1621,10 @@ async function googleGeminiImage(params) {
1614
1621
  }
1615
1622
  }
1616
1623
  }
1624
+ if (resources.length === 0) {
1625
+ const errorResource = firstTextResource || { type: "text", url: "" };
1626
+ validateResourceUrl(errorResource, "image");
1627
+ }
1617
1628
  return resources;
1618
1629
  }
1619
1630