smoltalk 0.0.41 → 0.0.42

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.
@@ -65,11 +65,10 @@ export class SmolGoogle extends BaseClient {
65
65
  if (tools.length > 0) {
66
66
  genConfig.tools = [{ functionDeclarations: tools }];
67
67
  }
68
- // Google Gemini does not support combining function calling with
69
- // responseMimeType 'application/json'. When tools are present, skip
70
- // setting the JSON response format — the BaseClient's textWithRetry
71
- // will still validate/parse the response against the schema.
72
- if (config.responseFormat && tools.length === 0) {
68
+ if (config.responseFormat && tools.length > 0) {
69
+ console.error("Warning: Both responseFormat and tools are specified in the prompt config. Google Gemini does not support enforcing a response format when tools are included, so the responseFormat will be ignored.");
70
+ }
71
+ else if (config.responseFormat && tools.length === 0) {
73
72
  genConfig.responseMimeType = "application/json";
74
73
  genConfig.responseJsonSchema = config.responseFormat.toJSONSchema();
75
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smoltalk",
3
- "version": "0.0.41",
3
+ "version": "0.0.42",
4
4
  "description": "A common interface for LLM APIs",
5
5
  "homepage": "https://github.com/egonSchiele/smoltalk",
6
6
  "scripts": {