@effect-uai/anthropic 0.16.0 → 0.18.0
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/README.md +3 -3
- package/dist/Anthropic.d.mts +1 -1
- package/dist/Anthropic.mjs +2 -2
- package/dist/Anthropic.mjs.map +1 -1
- package/dist/AnthropicTools.mjs +1 -1
- package/dist/anthropicTools.test.mjs +1 -1
- package/dist/codec.d.mts.map +1 -1
- package/dist/codec.mjs +4 -3
- package/dist/codec.mjs.map +1 -1
- package/dist/dist-DHer1cql.mjs +1533 -0
- package/dist/dist-DHer1cql.mjs.map +1 -0
- package/dist/{test.DNmyFkvJ-N3QqMRwZ.mjs → index.C4tKZ0yW-xEu55bU4.mjs} +8276 -7092
- package/dist/index.C4tKZ0yW-xEu55bU4.mjs.map +1 -0
- package/dist/{rolldown-runtime-D7D4PA-g.mjs → rolldown-runtime-EAsCxrDo.mjs} +2 -1
- package/dist/streamEvents.mjs +1 -1
- package/dist/usage.test.mjs +1 -1
- package/package.json +4 -4
- package/src/Anthropic.ts +1 -1
- package/src/codec.ts +3 -2
- package/dist/magic-string.es-CUAnjKYC.mjs +0 -1014
- package/dist/magic-string.es-CUAnjKYC.mjs.map +0 -1
- package/dist/test.DNmyFkvJ-N3QqMRwZ.mjs.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
//#region \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
3
4
|
var __exportAll = (all, no_symbols) => {
|
|
4
5
|
let target = {};
|
|
5
6
|
for (var name in all) __defProp(target, name, {
|
|
@@ -10,4 +11,4 @@ var __exportAll = (all, no_symbols) => {
|
|
|
10
11
|
return target;
|
|
11
12
|
};
|
|
12
13
|
//#endregion
|
|
13
|
-
export { __exportAll as t };
|
|
14
|
+
export { __exportAll as n, __commonJSMin as t };
|
package/dist/streamEvents.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as __exportAll } from "./rolldown-runtime-EAsCxrDo.mjs";
|
|
2
2
|
import { WireContentBlock, appendInputJsonDelta, appendSignatureDelta, appendTextDelta, appendThinkingDelta, mergeUsage, setStopReason, startBlock } from "./codec.mjs";
|
|
3
3
|
import { Match, Schema } from "effect";
|
|
4
4
|
//#region src/streamEvents.ts
|
package/dist/usage.test.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { emptyAccumulator, mergeUsage } from "./codec.mjs";
|
|
2
2
|
import { applyEvent } from "./streamEvents.mjs";
|
|
3
|
-
import { n as describe, r as it, t as globalExpect } from "./
|
|
3
|
+
import { n as describe, r as it, t as globalExpect } from "./index.C4tKZ0yW-xEu55bU4.mjs";
|
|
4
4
|
//#region src/usage.test.ts
|
|
5
5
|
const wire = {
|
|
6
6
|
input_tokens: 94,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-uai/anthropic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Anthropic Messages API provider for @effect-uai/core.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"effect": "4.0.
|
|
46
|
+
"effect": "4.0.1",
|
|
47
47
|
"typescript": "^7.0.2",
|
|
48
|
-
"@effect-uai/core": "0.
|
|
48
|
+
"@effect-uai/core": "0.18.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@effect-uai/core": ">=0.2.0 <1",
|
|
52
|
-
"effect": ">=4.0.
|
|
52
|
+
"effect": ">=4.0.1 <5.0.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "tsdown",
|
package/src/Anthropic.ts
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
Stream,
|
|
11
11
|
pipe,
|
|
12
12
|
} from "effect"
|
|
13
|
-
import { HttpClient, HttpClientRequest } from "effect/
|
|
13
|
+
import { HttpClient, HttpClientRequest } from "effect/http"
|
|
14
14
|
import * as AiError from "@effect-uai/core/AiError"
|
|
15
15
|
import * as Capabilities from "@effect-uai/core/Capabilities"
|
|
16
16
|
import {
|
package/src/codec.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Array as Arr,
|
|
1
|
+
import { Array as Arr, Match, Option, Order, Result, Schema, pipe } from "effect"
|
|
2
|
+
import { Base64 } from "effect/encoding"
|
|
2
3
|
import * as Items from "@effect-uai/core/Items"
|
|
3
4
|
import { JsonParseError } from "@effect-uai/core/JSONL"
|
|
4
5
|
import type { Turn } from "@effect-uai/core/Turn"
|
|
@@ -129,7 +130,7 @@ const imageSourceToWire = Match.type<Items.InputImage["source"]>().pipe(
|
|
|
129
130
|
Match.tag("bytes", (s): RequestImageContent["source"] => ({
|
|
130
131
|
type: "base64",
|
|
131
132
|
media_type: s.mimeType,
|
|
132
|
-
data:
|
|
133
|
+
data: Base64.encode(s.bytes),
|
|
133
134
|
})),
|
|
134
135
|
Match.exhaustive,
|
|
135
136
|
)
|