@effect/ai 0.10.2 → 0.10.4
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/AiModel/package.json +6 -0
- package/AiModels/package.json +6 -0
- package/AiPlan/package.json +6 -0
- package/dist/cjs/AiModel.js +44 -0
- package/dist/cjs/AiModel.js.map +1 -0
- package/dist/cjs/AiModels.js +54 -0
- package/dist/cjs/AiModels.js.map +1 -0
- package/dist/cjs/AiPlan.js +30 -0
- package/dist/cjs/AiPlan.js.map +1 -0
- package/dist/cjs/index.js +7 -1
- package/dist/cjs/internal/aiPlan.js +91 -0
- package/dist/cjs/internal/aiPlan.js.map +1 -0
- package/dist/dts/AiError.d.ts +1 -1
- package/dist/dts/AiModel.d.ts +61 -0
- package/dist/dts/AiModel.d.ts.map +1 -0
- package/dist/dts/AiModels.d.ts +34 -0
- package/dist/dts/AiModels.d.ts.map +1 -0
- package/dist/dts/AiPlan.d.ts +126 -0
- package/dist/dts/AiPlan.d.ts.map +1 -0
- package/dist/dts/index.d.ts +12 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/internal/aiPlan.d.ts +2 -0
- package/dist/dts/internal/aiPlan.d.ts.map +1 -0
- package/dist/esm/AiModel.js +35 -0
- package/dist/esm/AiModel.js.map +1 -0
- package/dist/esm/AiModels.js +44 -0
- package/dist/esm/AiModels.js.map +1 -0
- package/dist/esm/AiPlan.js +22 -0
- package/dist/esm/AiPlan.js.map +1 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/internal/aiPlan.js +82 -0
- package/dist/esm/internal/aiPlan.js.map +1 -0
- package/package.json +28 -4
- package/src/AiModel.ts +91 -0
- package/src/AiModels.ts +77 -0
- package/src/AiPlan.ts +152 -0
- package/src/index.ts +15 -0
- package/src/internal/aiPlan.ts +163 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import * as Context from "effect/Context";
|
|
5
|
+
import * as Effect from "effect/Effect";
|
|
6
|
+
import * as Equal from "effect/Equal";
|
|
7
|
+
import * as Hash from "effect/Hash";
|
|
8
|
+
import * as Layer from "effect/Layer";
|
|
9
|
+
import * as RcMap from "effect/RcMap";
|
|
10
|
+
/**
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
* @category tags
|
|
13
|
+
*/
|
|
14
|
+
export class AiModels extends /*#__PURE__*/Context.Tag("@effect/ai/AiModels")() {}
|
|
15
|
+
class AiModelsKey {
|
|
16
|
+
model;
|
|
17
|
+
service;
|
|
18
|
+
constructor(model, service) {
|
|
19
|
+
this.model = model;
|
|
20
|
+
this.service = service;
|
|
21
|
+
}
|
|
22
|
+
[Equal.symbol](that) {
|
|
23
|
+
return this.service === that.service && this.model.cacheKey === that.model.cacheKey;
|
|
24
|
+
}
|
|
25
|
+
[Hash.symbol]() {
|
|
26
|
+
return Hash.combine(Hash.hash(this.service))(Hash.hash(this.model.cacheKey));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const make = /*#__PURE__*/Effect.gen(function* () {
|
|
30
|
+
const services = yield* RcMap.make({
|
|
31
|
+
idleTimeToLive: "1 minute",
|
|
32
|
+
lookup: key => Effect.provideService(key.model.provides, key.model.requires, key.service)
|
|
33
|
+
});
|
|
34
|
+
const build = (model, context) => Effect.map(RcMap.get(services, new AiModelsKey(model, Context.get(context, model.requires))), context => model.updateContext(context));
|
|
35
|
+
return {
|
|
36
|
+
build
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* @since 1.0.0
|
|
41
|
+
* @category layers
|
|
42
|
+
*/
|
|
43
|
+
export const layer = /*#__PURE__*/Layer.scoped(AiModels, make);
|
|
44
|
+
//# sourceMappingURL=AiModels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiModels.js","names":["Context","Effect","Equal","Hash","Layer","RcMap","AiModels","Tag","AiModelsKey","model","service","constructor","symbol","that","cacheKey","combine","hash","make","gen","services","idleTimeToLive","lookup","key","provideService","provides","requires","build","context","map","get","updateContext","layer","scoped"],"sources":["../../src/AiModels.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,IAAI,MAAM,aAAa;AACnC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AAIrC;;;;AAIA,OAAM,MAAOC,QAAS,sBAAQN,OAAO,CAACO,GAAG,CAAC,qBAAqB,CAAC,EAG7D;AAkBH,MAAMC,WAAW;EAEJC,KAAA;EACAC,OAAA;EAFXC,YACWF,KAAwB,EACxBC,OAAgB;IADhB,KAAAD,KAAK,GAALA,KAAK;IACL,KAAAC,OAAO,GAAPA,OAAO;EACf;EAEH,CAACR,KAAK,CAACU,MAAM,EAAEC,IAAiB;IAC9B,OAAO,IAAI,CAACH,OAAO,KAAKG,IAAI,CAACH,OAAO,IAAI,IAAI,CAACD,KAAK,CAACK,QAAQ,KAAKD,IAAI,CAACJ,KAAK,CAACK,QAAQ;EACrF;EACA,CAACX,IAAI,CAACS,MAAM,IAAC;IACX,OAAOT,IAAI,CAACY,OAAO,CAACZ,IAAI,CAACa,IAAI,CAAC,IAAI,CAACN,OAAO,CAAC,CAAC,CAACP,IAAI,CAACa,IAAI,CAAC,IAAI,CAACP,KAAK,CAACK,QAAQ,CAAC,CAAC;EAC9E;;AAGF,MAAMG,IAAI,gBAAGhB,MAAM,CAACiB,GAAG,CAAC,aAAS;EAC/B,MAAMC,QAAQ,GAAG,OAAOd,KAAK,CAACY,IAAI,CAAC;IACjCG,cAAc,EAAE,UAAU;IAC1BC,MAAM,EAAGC,GAAgB,IAAKrB,MAAM,CAACsB,cAAc,CAACD,GAAG,CAACb,KAAK,CAACe,QAAQ,EAAEF,GAAG,CAACb,KAAK,CAACgB,QAAQ,EAAEH,GAAG,CAACZ,OAAO;GACxG,CAAC;EAEF,MAAMgB,KAAK,GAAGA,CACZjB,KAAkC,EAClCkB,OAAkC,KAElC1B,MAAM,CAAC2B,GAAG,CACRvB,KAAK,CAACwB,GAAG,CACPV,QAAQ,EACR,IAAIX,WAAW,CAACC,KAAK,EAAET,OAAO,CAAC6B,GAAG,CAACF,OAAO,EAAElB,KAAK,CAACgB,QAAe,CAAC,CAAC,CACpE,EACAE,OAAO,IAAKlB,KAAK,CAACqB,aAAa,CAACH,OAAO,CAAC,CAC1C;EAEH,OAAO;IAAED;EAAK,CAAW;AAC3B,CAAC,CAAC;AAEF;;;;AAIA,OAAO,MAAMK,KAAK,gBAA0B3B,KAAK,CAAC4B,MAAM,CAAC1B,QAAQ,EAAEW,IAAI,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as Internal from "./internal/aiPlan.js";
|
|
2
|
+
/**
|
|
3
|
+
* @since 1.0.0
|
|
4
|
+
* @category type ids
|
|
5
|
+
*/
|
|
6
|
+
export const TypeId = Internal.TypeId;
|
|
7
|
+
/**
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @category constructors
|
|
10
|
+
*/
|
|
11
|
+
export const fromModel = Internal.fromModel;
|
|
12
|
+
/**
|
|
13
|
+
* @since 1.0.0
|
|
14
|
+
* @category error handling
|
|
15
|
+
*/
|
|
16
|
+
export const withFallback = Internal.withFallback;
|
|
17
|
+
/**
|
|
18
|
+
* @since 1.0.0
|
|
19
|
+
* @category combination
|
|
20
|
+
*/
|
|
21
|
+
export const concatSteps = Internal.concatSteps;
|
|
22
|
+
//# sourceMappingURL=AiPlan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiPlan.js","names":["Internal","TypeId","fromModel","withFallback","concatSteps"],"sources":["../../src/AiPlan.ts"],"sourcesContent":[null],"mappings":"AAWA,OAAO,KAAKA,QAAQ,MAAM,sBAAsB;AAEhD;;;;AAIA,OAAO,MAAMC,MAAM,GAAkBD,QAAQ,CAACC,MAAM;AAmEpD;;;;AAIA,OAAO,MAAMC,SAAS,GAO+BF,QAAQ,CAACE,SAAS;AAEvE;;;;AAIA,OAAO,MAAMC,YAAY,GA4BrBH,QAAQ,CAACG,YAAY;AAEzB;;;;AAIA,OAAO,MAAMC,WAAW,GAgBpBJ,QAAQ,CAACI,WAAW","ignoreList":[]}
|
package/dist/esm/index.js
CHANGED
|
@@ -10,6 +10,18 @@ export * as AiError from "./AiError.js";
|
|
|
10
10
|
* @since 1.0.0
|
|
11
11
|
*/
|
|
12
12
|
export * as AiInput from "./AiInput.js";
|
|
13
|
+
/**
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
*/
|
|
16
|
+
export * as AiModel from "./AiModel.js";
|
|
17
|
+
/**
|
|
18
|
+
* @since 1.0.0
|
|
19
|
+
*/
|
|
20
|
+
export * as AiModels from "./AiModels.js";
|
|
21
|
+
/**
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
*/
|
|
24
|
+
export * as AiPlan from "./AiPlan.js";
|
|
13
25
|
/**
|
|
14
26
|
* @since 1.0.0
|
|
15
27
|
*/
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["AiChat","AiError","AiInput","AiResponse","AiRole","AiTelemetry","AiToolkit","Completions","Embeddings","Tokenizer"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,MAAM,MAAM,aAAa;AAErC;;;AAGA,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;AAGA,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;AAGA,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAE7C;;;AAGA,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC;;;AAGA,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;AAGA,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C;;;AAGA,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAE7C;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["AiChat","AiError","AiInput","AiModel","AiModels","AiPlan","AiResponse","AiRole","AiTelemetry","AiToolkit","Completions","Embeddings","Tokenizer"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,MAAM,MAAM,aAAa;AAErC;;;AAGA,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;AAGA,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;AAGA,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;AAGA,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAEzC;;;AAGA,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC;;;AAGA,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAE7C;;;AAGA,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC;;;AAGA,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;AAGA,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C;;;AAGA,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAE7C;;;AAGA,OAAO,KAAKC,SAAS,MAAM,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as Cause from "effect/Cause";
|
|
2
|
+
import * as Context from "effect/Context";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import { CommitPrototype } from "effect/Effectable";
|
|
5
|
+
import * as Exit from "effect/Exit";
|
|
6
|
+
import { dual, identity } from "effect/Function";
|
|
7
|
+
import * as Option from "effect/Option";
|
|
8
|
+
import { pipeArguments } from "effect/Pipeable";
|
|
9
|
+
import * as Predicate from "effect/Predicate";
|
|
10
|
+
import * as Schedule from "effect/Schedule";
|
|
11
|
+
import * as Scope from "effect/Scope";
|
|
12
|
+
import { AiModels } from "../AiModels.js";
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const TypeId = /*#__PURE__*/Symbol.for("@effect/ai/AiPlan");
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const PlanPrototype = {
|
|
17
|
+
...CommitPrototype,
|
|
18
|
+
[TypeId]: TypeId,
|
|
19
|
+
commit() {
|
|
20
|
+
return buildPlan(this);
|
|
21
|
+
},
|
|
22
|
+
pipe() {
|
|
23
|
+
return pipeArguments(this, arguments);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const makePlan = steps => {
|
|
27
|
+
const self = Object.create(PlanPrototype);
|
|
28
|
+
self.steps = steps;
|
|
29
|
+
return self;
|
|
30
|
+
};
|
|
31
|
+
const buildPlan = plan => Effect.map(Effect.context(), context => {
|
|
32
|
+
const models = Context.get(context, AiModels);
|
|
33
|
+
return Effect.fnUntraced(function* (effect) {
|
|
34
|
+
let exit = undefined;
|
|
35
|
+
for (const step of plan.steps) {
|
|
36
|
+
if (exit !== undefined && Exit.isFailure(exit) && Option.isSome(step.check)) {
|
|
37
|
+
const check = step.check.value(Cause.squash(exit.cause));
|
|
38
|
+
const isFatalError = !(Effect.isEffect(check) ? yield* check : check);
|
|
39
|
+
if (isFatalError) break;
|
|
40
|
+
}
|
|
41
|
+
const retryOptions = getRetryOptions(step);
|
|
42
|
+
exit = yield* Effect.scopedWith(scope => models.build(step.model, context).pipe(Scope.extend(scope), Effect.flatMap(context => effect.pipe(Option.isSome(retryOptions) ? Effect.retry(retryOptions.value) : identity, Effect.provide(context))), Effect.exit));
|
|
43
|
+
if (Exit.isSuccess(exit)) break;
|
|
44
|
+
}
|
|
45
|
+
return yield* exit;
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
const getRetryOptions = step => {
|
|
49
|
+
if (Option.isNone(step.schedule) && Option.isNone(step.check)) {
|
|
50
|
+
return Option.none();
|
|
51
|
+
}
|
|
52
|
+
return Option.some({
|
|
53
|
+
schedule: Option.getOrUndefined(step.schedule),
|
|
54
|
+
while: Option.getOrUndefined(step.check)
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const fromModel = (model, options) => makePlan([{
|
|
59
|
+
model,
|
|
60
|
+
check: Option.fromNullable(options?.while),
|
|
61
|
+
schedule: resolveSchedule(options ?? {})
|
|
62
|
+
}]);
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const withFallback = /*#__PURE__*/dual(2, (self, options) => makePlan([...self.steps, {
|
|
65
|
+
model: options.model,
|
|
66
|
+
check: Option.fromNullable(options.while),
|
|
67
|
+
schedule: resolveSchedule(options)
|
|
68
|
+
}]));
|
|
69
|
+
const resolveSchedule = options => {
|
|
70
|
+
if (Predicate.isUndefined(options.attempts) && Predicate.isUndefined(options.schedule)) return Option.none();
|
|
71
|
+
let schedule = options.schedule ?? Schedule.forever;
|
|
72
|
+
if (Predicate.isNotUndefined(options.attempts)) {
|
|
73
|
+
// In an `AiPlan`, the `attempts` represents the total number of times to
|
|
74
|
+
// attempt the call, not the number of retries, thus we subtract one from
|
|
75
|
+
// the total number of recurrences
|
|
76
|
+
schedule = Schedule.intersect(schedule, Schedule.recurs(options.attempts - 1));
|
|
77
|
+
}
|
|
78
|
+
return Option.some(schedule);
|
|
79
|
+
};
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const concatSteps = /*#__PURE__*/dual(2, (self, other) => makePlan([...self.steps, ...other.steps]));
|
|
82
|
+
//# sourceMappingURL=aiPlan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aiPlan.js","names":["Cause","Context","Effect","CommitPrototype","Exit","dual","identity","Option","pipeArguments","Predicate","Schedule","Scope","AiModels","TypeId","Symbol","for","PlanPrototype","commit","buildPlan","pipe","arguments","makePlan","steps","self","Object","create","plan","map","context","models","get","fnUntraced","effect","exit","undefined","step","isFailure","isSome","check","value","squash","cause","isFatalError","isEffect","retryOptions","getRetryOptions","scopedWith","scope","build","model","extend","flatMap","retry","provide","isSuccess","isNone","schedule","none","some","getOrUndefined","while","fromModel","options","fromNullable","resolveSchedule","withFallback","isUndefined","attempts","forever","isNotUndefined","intersect","recurs","concatSteps","other"],"sources":["../../../src/internal/aiPlan.ts"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/ai",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"description": "Effect modules for working with AI apis",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"sideEffects": [],
|
|
12
12
|
"dependencies": {},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@effect/experimental": "^0.41.
|
|
15
|
-
"
|
|
16
|
-
"effect": "^
|
|
14
|
+
"@effect/experimental": "^0.41.4",
|
|
15
|
+
"effect": "^3.13.4",
|
|
16
|
+
"@effect/platform": "^0.77.4"
|
|
17
17
|
},
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"provenance": true
|
|
@@ -43,6 +43,21 @@
|
|
|
43
43
|
"import": "./dist/esm/AiInput.js",
|
|
44
44
|
"default": "./dist/cjs/AiInput.js"
|
|
45
45
|
},
|
|
46
|
+
"./AiModel": {
|
|
47
|
+
"types": "./dist/dts/AiModel.d.ts",
|
|
48
|
+
"import": "./dist/esm/AiModel.js",
|
|
49
|
+
"default": "./dist/cjs/AiModel.js"
|
|
50
|
+
},
|
|
51
|
+
"./AiModels": {
|
|
52
|
+
"types": "./dist/dts/AiModels.d.ts",
|
|
53
|
+
"import": "./dist/esm/AiModels.js",
|
|
54
|
+
"default": "./dist/cjs/AiModels.js"
|
|
55
|
+
},
|
|
56
|
+
"./AiPlan": {
|
|
57
|
+
"types": "./dist/dts/AiPlan.d.ts",
|
|
58
|
+
"import": "./dist/esm/AiPlan.js",
|
|
59
|
+
"default": "./dist/cjs/AiPlan.js"
|
|
60
|
+
},
|
|
46
61
|
"./AiResponse": {
|
|
47
62
|
"types": "./dist/dts/AiResponse.d.ts",
|
|
48
63
|
"import": "./dist/esm/AiResponse.js",
|
|
@@ -90,6 +105,15 @@
|
|
|
90
105
|
"AiInput": [
|
|
91
106
|
"./dist/dts/AiInput.d.ts"
|
|
92
107
|
],
|
|
108
|
+
"AiModel": [
|
|
109
|
+
"./dist/dts/AiModel.d.ts"
|
|
110
|
+
],
|
|
111
|
+
"AiModels": [
|
|
112
|
+
"./dist/dts/AiModels.d.ts"
|
|
113
|
+
],
|
|
114
|
+
"AiPlan": [
|
|
115
|
+
"./dist/dts/AiPlan.d.ts"
|
|
116
|
+
],
|
|
93
117
|
"AiResponse": [
|
|
94
118
|
"./dist/dts/AiResponse.d.ts"
|
|
95
119
|
],
|
package/src/AiModel.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import type * as Context from "effect/Context"
|
|
5
|
+
import type * as Effect from "effect/Effect"
|
|
6
|
+
import * as Option from "effect/Option"
|
|
7
|
+
import type * as Scope from "effect/Scope"
|
|
8
|
+
import type * as AiPlan from "./AiPlan.js"
|
|
9
|
+
import * as InternalAiPlan from "./internal/aiPlan.js"
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
* @category type ids
|
|
14
|
+
*/
|
|
15
|
+
export const TypeId: unique symbol = Symbol.for("@effect/ai/AiModel")
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @since 1.0.0
|
|
19
|
+
* @category type ids
|
|
20
|
+
*/
|
|
21
|
+
export type TypeId = typeof TypeId
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @since 1.0.0
|
|
25
|
+
* @category type ids
|
|
26
|
+
*/
|
|
27
|
+
export const PlanTypeId: unique symbol = Symbol.for("@effect/ai/Plan")
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @since 1.0.0
|
|
31
|
+
* @category type ids
|
|
32
|
+
*/
|
|
33
|
+
export type PlanTypeId = typeof TypeId
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @since 1.0.0
|
|
37
|
+
* @category models
|
|
38
|
+
*/
|
|
39
|
+
export interface AiModel<in out Provides, in out Requires> extends AiPlan.AiPlan<unknown, Provides, Requires> {
|
|
40
|
+
readonly [TypeId]: TypeId
|
|
41
|
+
readonly model: string
|
|
42
|
+
readonly cacheKey: symbol
|
|
43
|
+
readonly requires: Context.Tag<Requires, any>
|
|
44
|
+
readonly provides: AiModel.ContextBuilder<Provides, Requires>
|
|
45
|
+
readonly updateContext: (context: Context.Context<Provides>) => Context.Context<Provides>
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @since 1.0.0
|
|
50
|
+
*/
|
|
51
|
+
export declare namespace AiModel {
|
|
52
|
+
/**
|
|
53
|
+
* @since 1.0.0
|
|
54
|
+
* @category AiModel
|
|
55
|
+
*/
|
|
56
|
+
export type ContextBuilder<Provides, Requires> = Effect.Effect<
|
|
57
|
+
Context.Context<Provides>,
|
|
58
|
+
never,
|
|
59
|
+
Requires | Scope.Scope
|
|
60
|
+
>
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const AiModelProto = {
|
|
64
|
+
...InternalAiPlan.PlanPrototype,
|
|
65
|
+
[TypeId]: TypeId
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @since 1.0.0
|
|
70
|
+
* @category constructors
|
|
71
|
+
*/
|
|
72
|
+
export const make = <Provides, Requires>(options: {
|
|
73
|
+
readonly model: string
|
|
74
|
+
readonly cacheKey: symbol
|
|
75
|
+
readonly requires: Context.Tag<Requires, any>
|
|
76
|
+
readonly provides: AiModel.ContextBuilder<Provides, Requires>
|
|
77
|
+
readonly updateContext: (context: Context.Context<Provides>) => Context.Context<Provides>
|
|
78
|
+
}): AiModel<Provides, Requires> => {
|
|
79
|
+
const self = Object.create(AiModelProto)
|
|
80
|
+
self.cacheKey = options.cacheKey
|
|
81
|
+
self.model = options.model
|
|
82
|
+
self.provides = options.provides
|
|
83
|
+
self.requires = options.requires
|
|
84
|
+
self.updateContext = options.updateContext
|
|
85
|
+
self.steps = [{
|
|
86
|
+
model: self,
|
|
87
|
+
check: Option.none(),
|
|
88
|
+
schedule: Option.none()
|
|
89
|
+
}]
|
|
90
|
+
return self
|
|
91
|
+
}
|
package/src/AiModels.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import * as Context from "effect/Context"
|
|
5
|
+
import * as Effect from "effect/Effect"
|
|
6
|
+
import * as Equal from "effect/Equal"
|
|
7
|
+
import * as Hash from "effect/Hash"
|
|
8
|
+
import * as Layer from "effect/Layer"
|
|
9
|
+
import * as RcMap from "effect/RcMap"
|
|
10
|
+
import type * as Scope from "effect/Scope"
|
|
11
|
+
import type { AiModel } from "./AiModel.js"
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
* @category tags
|
|
16
|
+
*/
|
|
17
|
+
export class AiModels extends Context.Tag("@effect/ai/AiModels")<
|
|
18
|
+
AiModels,
|
|
19
|
+
AiModels.Service
|
|
20
|
+
>() {}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @since 1.0.0
|
|
24
|
+
*/
|
|
25
|
+
export declare namespace AiModels {
|
|
26
|
+
/**
|
|
27
|
+
* @since 1.0.0
|
|
28
|
+
* @category models
|
|
29
|
+
*/
|
|
30
|
+
export interface Service {
|
|
31
|
+
readonly build: <Provides, Requires>(
|
|
32
|
+
model: AiModel<Provides, Requires>,
|
|
33
|
+
context: Context.Context<Requires>
|
|
34
|
+
) => Effect.Effect<Context.Context<Provides>, never, Scope.Scope>
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
class AiModelsKey {
|
|
39
|
+
constructor(
|
|
40
|
+
readonly model: AiModel<any, any>,
|
|
41
|
+
readonly service: unknown
|
|
42
|
+
) {}
|
|
43
|
+
|
|
44
|
+
[Equal.symbol](that: AiModelsKey): boolean {
|
|
45
|
+
return this.service === that.service && this.model.cacheKey === that.model.cacheKey
|
|
46
|
+
}
|
|
47
|
+
[Hash.symbol](): number {
|
|
48
|
+
return Hash.combine(Hash.hash(this.service))(Hash.hash(this.model.cacheKey))
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const make = Effect.gen(function*() {
|
|
53
|
+
const services = yield* RcMap.make({
|
|
54
|
+
idleTimeToLive: "1 minute",
|
|
55
|
+
lookup: (key: AiModelsKey) => Effect.provideService(key.model.provides, key.model.requires, key.service)
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
const build = <Provides, Requires>(
|
|
59
|
+
model: AiModel<Provides, Requires>,
|
|
60
|
+
context: Context.Context<Requires>
|
|
61
|
+
): Effect.Effect<Context.Context<Provides>, never, Scope.Scope> =>
|
|
62
|
+
Effect.map(
|
|
63
|
+
RcMap.get(
|
|
64
|
+
services,
|
|
65
|
+
new AiModelsKey(model, Context.get(context, model.requires as any))
|
|
66
|
+
),
|
|
67
|
+
(context) => model.updateContext(context)
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
return { build } as const
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @since 1.0.0
|
|
75
|
+
* @category layers
|
|
76
|
+
*/
|
|
77
|
+
export const layer: Layer.Layer<AiModels> = Layer.scoped(AiModels, make)
|
package/src/AiPlan.ts
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import type { NonEmptyReadonlyArray } from "effect/Array"
|
|
5
|
+
import type * as Effect from "effect/Effect"
|
|
6
|
+
import type * as Option from "effect/Option"
|
|
7
|
+
import type { Pipeable } from "effect/Pipeable"
|
|
8
|
+
import type * as Schedule from "effect/Schedule"
|
|
9
|
+
import type * as Unify from "effect/Unify"
|
|
10
|
+
import type * as AiModel from "./AiModel.js"
|
|
11
|
+
import type { AiModels } from "./AiModels.js"
|
|
12
|
+
import * as Internal from "./internal/aiPlan.js"
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @since 1.0.0
|
|
16
|
+
* @category type ids
|
|
17
|
+
*/
|
|
18
|
+
export const TypeId: unique symbol = Internal.TypeId
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @since 1.0.0
|
|
22
|
+
* @category type ids
|
|
23
|
+
*/
|
|
24
|
+
export type TypeId = typeof TypeId
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @since 1.0.0
|
|
28
|
+
* @category AiPlan
|
|
29
|
+
*/
|
|
30
|
+
export interface AiPlan<in Error, in out Provides, in out Requires>
|
|
31
|
+
extends Pipeable, AiPlan.Builder<Provides, Requires>
|
|
32
|
+
{
|
|
33
|
+
readonly [TypeId]: TypeId
|
|
34
|
+
readonly [Unify.typeSymbol]?: unknown
|
|
35
|
+
readonly [Unify.unifySymbol]?: AiPlanUnify<this>
|
|
36
|
+
readonly [Unify.ignoreSymbol]?: AiPlanUnifyIgnore
|
|
37
|
+
readonly steps: NonEmptyReadonlyArray<AiPlan.Step<Error, Provides, Requires>>
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @since 1.0.0
|
|
42
|
+
* @category Plan
|
|
43
|
+
*/
|
|
44
|
+
export interface AiPlanUnify<A extends { [Unify.typeSymbol]?: any }> extends Effect.EffectUnify<A> {
|
|
45
|
+
AiPlan?: () => Extract<A[Unify.typeSymbol], AiPlan<any, any, any>>
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @since 1.0.0
|
|
50
|
+
* @category Plan
|
|
51
|
+
*/
|
|
52
|
+
export interface AiPlanUnifyIgnore extends Effect.EffectUnifyIgnore {
|
|
53
|
+
Effect?: true
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @since 1.0.0
|
|
58
|
+
*/
|
|
59
|
+
export declare namespace AiPlan {
|
|
60
|
+
/**
|
|
61
|
+
* @since 1.0.0
|
|
62
|
+
* @category AiPlan
|
|
63
|
+
*/
|
|
64
|
+
export type Builder<Provides, Requires> = Effect.Effect<Provider<Provides>, never, AiModels | Requires>
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @since 1.0.0
|
|
68
|
+
* @category AiPlan
|
|
69
|
+
*/
|
|
70
|
+
export interface Provider<Provides> {
|
|
71
|
+
readonly provide: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, Provides>>
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @since 1.0.0
|
|
76
|
+
* @category AiPlan
|
|
77
|
+
*/
|
|
78
|
+
export interface Step<Error, Provides, Requires> {
|
|
79
|
+
readonly model: AiModel.AiModel<Provides, Requires>
|
|
80
|
+
readonly check: Option.Option<(error: Error) => boolean | Effect.Effect<boolean>>
|
|
81
|
+
readonly schedule: Option.Option<Schedule.Schedule<any, Error, Requires>>
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @since 1.0.0
|
|
87
|
+
* @category constructors
|
|
88
|
+
*/
|
|
89
|
+
export const fromModel: <Provides, Requires, EW, Out, ES, RW = never, RS = never>(
|
|
90
|
+
model: AiModel.AiModel<Provides, Requires>,
|
|
91
|
+
options?: {
|
|
92
|
+
readonly attempts?: number | undefined
|
|
93
|
+
readonly while?: ((error: EW) => boolean | Effect.Effect<boolean, never, RW>) | undefined
|
|
94
|
+
readonly schedule?: Schedule.Schedule<Out, ES, RS> | undefined
|
|
95
|
+
}
|
|
96
|
+
) => AiPlan<EW & ES, Provides, RW | RS | Requires> = Internal.fromModel
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @since 1.0.0
|
|
100
|
+
* @category error handling
|
|
101
|
+
*/
|
|
102
|
+
export const withFallback: {
|
|
103
|
+
/**
|
|
104
|
+
* @since 1.0.0
|
|
105
|
+
* @category error handling
|
|
106
|
+
*/
|
|
107
|
+
<Provides, Provides2 extends Provides, Requires2, Out, EW, ES, RW = never, RS = never>(
|
|
108
|
+
options: {
|
|
109
|
+
readonly model: AiModel.AiModel<Provides2, Requires2>
|
|
110
|
+
readonly attempts?: number | undefined
|
|
111
|
+
readonly while?: ((error: EW) => boolean | Effect.Effect<boolean, never, RW>) | undefined
|
|
112
|
+
readonly schedule?: Schedule.Schedule<Out, ES, RS> | undefined
|
|
113
|
+
}
|
|
114
|
+
): <E, Requires>(
|
|
115
|
+
self: AiPlan<E, Provides, Requires>
|
|
116
|
+
) => AiPlan<E & EW & ES, Provides & Provides2, Requires | Requires2 | RW | RS>
|
|
117
|
+
/**
|
|
118
|
+
* @since 1.0.0
|
|
119
|
+
* @category error handling
|
|
120
|
+
*/
|
|
121
|
+
<E, Provides, Requires, Provides2 extends Provides, Requires2, Out, EW, ES, RW = never, RS = never>(
|
|
122
|
+
self: AiPlan<E, Provides, Requires>,
|
|
123
|
+
options: {
|
|
124
|
+
readonly model: AiModel.AiModel<Provides2, Requires2>
|
|
125
|
+
readonly attempts?: number | undefined
|
|
126
|
+
readonly while?: ((error: EW) => boolean | Effect.Effect<boolean, never, RW>) | undefined
|
|
127
|
+
readonly schedule?: Schedule.Schedule<Out, ES, RS> | undefined
|
|
128
|
+
}
|
|
129
|
+
): AiPlan<E & EW & ES, Provides & Provides2, Requires | Requires2 | RW | RS>
|
|
130
|
+
} = Internal.withFallback
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @since 1.0.0
|
|
134
|
+
* @category combination
|
|
135
|
+
*/
|
|
136
|
+
export const concatSteps: {
|
|
137
|
+
/**
|
|
138
|
+
* @since 1.0.0
|
|
139
|
+
* @category combination
|
|
140
|
+
*/
|
|
141
|
+
<Error2, Provides2, Requires2>(other: AiPlan<Error2, Provides2, Requires2>): <Error, Provides, Requires>(
|
|
142
|
+
self: AiPlan<Error, Provides, Requires>
|
|
143
|
+
) => AiPlan<Error & Error2, Provides & Provides2, Requires | Requires2>
|
|
144
|
+
/**
|
|
145
|
+
* @since 1.0.0
|
|
146
|
+
* @category combination
|
|
147
|
+
*/
|
|
148
|
+
<Error, Provides, Requires, Error2, Provides2, Requires2>(
|
|
149
|
+
self: AiPlan<Error, Provides, Requires>,
|
|
150
|
+
other: AiPlan<Error2, Provides2, Requires2>
|
|
151
|
+
): AiPlan<Error & Error2, Provides & Provides2, Requires | Requires2>
|
|
152
|
+
} = Internal.concatSteps
|
package/src/index.ts
CHANGED
|
@@ -13,6 +13,21 @@ export * as AiError from "./AiError.js"
|
|
|
13
13
|
*/
|
|
14
14
|
export * as AiInput from "./AiInput.js"
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @since 1.0.0
|
|
18
|
+
*/
|
|
19
|
+
export * as AiModel from "./AiModel.js"
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
*/
|
|
24
|
+
export * as AiModels from "./AiModels.js"
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @since 1.0.0
|
|
28
|
+
*/
|
|
29
|
+
export * as AiPlan from "./AiPlan.js"
|
|
30
|
+
|
|
16
31
|
/**
|
|
17
32
|
* @since 1.0.0
|
|
18
33
|
*/
|