@core-ai/mistral 0.7.0 → 0.7.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.
Files changed (2) hide show
  1. package/dist/index.js +5 -15
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -11,7 +11,11 @@ import {
11
11
  } from "@core-ai/core-ai";
12
12
 
13
13
  // src/chat-adapter.ts
14
- import { zodSchemaToJsonSchema } from "@core-ai/core-ai";
14
+ import {
15
+ asObject,
16
+ safeParseJsonObject,
17
+ zodSchemaToJsonSchema
18
+ } from "@core-ai/core-ai";
15
19
 
16
20
  // src/provider-options.ts
17
21
  import { z } from "zod";
@@ -510,20 +514,6 @@ function toObject(value) {
510
514
  }
511
515
  return asObject(value);
512
516
  }
513
- function safeParseJsonObject(json) {
514
- try {
515
- const parsed = JSON.parse(json);
516
- return asObject(parsed);
517
- } catch {
518
- return {};
519
- }
520
- }
521
- function asObject(value) {
522
- if (value && typeof value === "object" && !Array.isArray(value)) {
523
- return value;
524
- }
525
- return {};
526
- }
527
517
 
528
518
  // src/mistral-error.ts
529
519
  import { MistralError } from "@mistralai/mistralai/models/errors";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@core-ai/mistral",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Mistral provider package for @core-ai/core-ai",
5
5
  "license": "MIT",
6
6
  "author": "Omnifact (https://omnifact.ai)",
@@ -41,7 +41,7 @@
41
41
  "test:watch": "vitest"
42
42
  },
43
43
  "dependencies": {
44
- "@core-ai/core-ai": "^0.7.0",
44
+ "@core-ai/core-ai": "^0.7.1",
45
45
  "@mistralai/mistralai": "^1.14.0"
46
46
  },
47
47
  "peerDependencies": {