@relayfx/sdk 0.0.4 → 0.0.5
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.js +1921 -1152
- package/dist/types/ai/language-model/language-model-registration.d.ts +10 -89
- package/package.json +11 -9
|
@@ -1,89 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export interface OpenAiInput extends RegistrationOptions {
|
|
12
|
-
readonly model: string;
|
|
13
|
-
readonly config?: Omit<typeof OpenAi.OpenAiLanguageModel.Config.Service, "model">;
|
|
14
|
-
}
|
|
15
|
-
export interface AnthropicInput extends RegistrationOptions {
|
|
16
|
-
readonly model: string;
|
|
17
|
-
readonly config?: Omit<typeof Anthropic.AnthropicLanguageModel.Config.Service, "model">;
|
|
18
|
-
}
|
|
19
|
-
export interface OpenRouterInput extends RegistrationOptions {
|
|
20
|
-
readonly model: string;
|
|
21
|
-
readonly config?: Omit<typeof OpenRouter.OpenRouterLanguageModel.Config.Service, "model">;
|
|
22
|
-
}
|
|
23
|
-
export interface OpenAiCompatibleInput extends RegistrationOptions {
|
|
24
|
-
readonly provider?: string;
|
|
25
|
-
readonly model: string;
|
|
26
|
-
readonly config?: Omit<typeof OpenAiCompat.OpenAiLanguageModel.Config.Service, "model">;
|
|
27
|
-
}
|
|
28
|
-
export declare const openAi: (input: OpenAiInput) => Effect.Effect<ModelRegistry.Registration, never, OpenAi.OpenAiClient.OpenAiClient>;
|
|
29
|
-
export declare const anthropic: (input: AnthropicInput) => Effect.Effect<ModelRegistry.Registration, never, Anthropic.AnthropicClient.AnthropicClient>;
|
|
30
|
-
export declare const openRouter: (input: OpenRouterInput) => Effect.Effect<ModelRegistry.Registration, never, OpenRouter.OpenRouterClient.OpenRouterClient>;
|
|
31
|
-
export declare const openAiCompatible: (input: OpenAiCompatibleInput) => Effect.Effect<ModelRegistry.Registration, never, OpenAiCompat.OpenAiClient.OpenAiClient>;
|
|
32
|
-
export declare const openAiClientLayerConfig: (options?: {
|
|
33
|
-
readonly apiKey?: Config.Config<Redacted.Redacted<string> | undefined> | undefined;
|
|
34
|
-
readonly apiUrl?: Config.Config<string> | undefined;
|
|
35
|
-
readonly organizationId?: Config.Config<Redacted.Redacted<string> | undefined> | undefined;
|
|
36
|
-
readonly projectId?: Config.Config<Redacted.Redacted<string> | undefined> | undefined;
|
|
37
|
-
readonly transformClient?: ((client: import("effect/unstable/http/HttpClient").HttpClient) => import("effect/unstable/http/HttpClient").HttpClient) | undefined;
|
|
38
|
-
}) => Layer.Layer<OpenAi.OpenAiClient.OpenAiClient, Config.ConfigError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
39
|
-
export declare const anthropicClientLayerConfig: (options?: {
|
|
40
|
-
readonly apiKey?: Config.Config<Redacted.Redacted<string> | undefined> | undefined;
|
|
41
|
-
readonly apiUrl?: Config.Config<string> | undefined;
|
|
42
|
-
readonly apiVersion?: Config.Config<string> | undefined;
|
|
43
|
-
readonly transformClient?: ((client: import("effect/unstable/http/HttpClient").HttpClient) => import("effect/unstable/http/HttpClient").HttpClient) | undefined;
|
|
44
|
-
}) => Layer.Layer<Anthropic.AnthropicClient.AnthropicClient, Config.ConfigError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
45
|
-
export declare const openRouterClientLayerConfig: (options?: {
|
|
46
|
-
readonly apiKey?: Config.Config<Redacted.Redacted<string> | undefined> | undefined;
|
|
47
|
-
readonly apiUrl?: Config.Config<string> | undefined;
|
|
48
|
-
readonly siteReferrer?: Config.Config<string> | undefined;
|
|
49
|
-
readonly siteTitle?: Config.Config<string> | undefined;
|
|
50
|
-
readonly transformClient?: ((client: import("effect/unstable/http/HttpClient").HttpClient) => import("effect/unstable/http/HttpClient").HttpClient) | undefined;
|
|
51
|
-
}) => Layer.Layer<OpenRouter.OpenRouterClient.OpenRouterClient, Config.ConfigError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
52
|
-
export declare const openAiCompatibleClientLayerConfig: (options?: {
|
|
53
|
-
readonly apiKey?: Config.Config<Redacted.Redacted<string> | undefined> | undefined;
|
|
54
|
-
readonly apiUrl?: Config.Config<string> | undefined;
|
|
55
|
-
readonly organizationId?: Config.Config<Redacted.Redacted<string> | undefined> | undefined;
|
|
56
|
-
readonly projectId?: Config.Config<Redacted.Redacted<string> | undefined> | undefined;
|
|
57
|
-
readonly transformClient?: ((client: import("effect/unstable/http/HttpClient").HttpClient) => import("effect/unstable/http/HttpClient").HttpClient) | undefined;
|
|
58
|
-
}) => Layer.Layer<OpenAiCompat.OpenAiClient.OpenAiClient, Config.ConfigError, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
59
|
-
export interface WithOpenAiOptions extends OpenAiInput {
|
|
60
|
-
readonly apiKey: Config.Config<Redacted.Redacted<string>>;
|
|
61
|
-
readonly clientConfig?: Omit<NonNullable<Parameters<typeof OpenAi.OpenAiClient.layerConfig>[0]>, "apiKey">;
|
|
62
|
-
}
|
|
63
|
-
export interface WithAnthropicOptions extends AnthropicInput {
|
|
64
|
-
readonly apiKey: Config.Config<Redacted.Redacted<string>>;
|
|
65
|
-
readonly clientConfig?: Omit<NonNullable<Parameters<typeof Anthropic.AnthropicClient.layerConfig>[0]>, "apiKey">;
|
|
66
|
-
}
|
|
67
|
-
export interface WithOpenRouterOptions extends OpenRouterInput {
|
|
68
|
-
readonly apiKey: Config.Config<Redacted.Redacted<string>>;
|
|
69
|
-
readonly clientConfig?: Omit<NonNullable<Parameters<typeof OpenRouter.OpenRouterClient.layerConfig>[0]>, "apiKey">;
|
|
70
|
-
}
|
|
71
|
-
export interface WithOpenAiCompatibleOptions extends OpenAiCompatibleInput {
|
|
72
|
-
readonly apiKey: Config.Config<Redacted.Redacted<string>>;
|
|
73
|
-
readonly clientConfig?: Omit<NonNullable<Parameters<typeof OpenAiCompat.OpenAiClient.layerConfig>[0]>, "apiKey">;
|
|
74
|
-
}
|
|
75
|
-
export declare const withOpenAi: (options: WithOpenAiOptions) => Layer.Layer<ModelRegistry.Service, Config.ConfigError, never>;
|
|
76
|
-
export declare const withAnthropic: (options: WithAnthropicOptions) => Layer.Layer<ModelRegistry.Service, Config.ConfigError, never>;
|
|
77
|
-
export declare const withOpenRouter: (options: WithOpenRouterOptions) => Layer.Layer<ModelRegistry.Service, Config.ConfigError, never>;
|
|
78
|
-
export declare const withOpenAiCompatible: (options: WithOpenAiCompatibleOptions) => Layer.Layer<ModelRegistry.Service, Config.ConfigError, never>;
|
|
79
|
-
export interface DeterministicInput extends RegistrationOptions {
|
|
80
|
-
readonly provider?: string;
|
|
81
|
-
readonly model?: string;
|
|
82
|
-
}
|
|
83
|
-
export declare const deterministicModel: (input?: DeterministicInput) => Effect.Effect<ModelRegistry.Registration, never, never>;
|
|
84
|
-
export declare const withDeterministic: (input?: DeterministicInput) => Layer.Layer<ModelRegistry.Service, never, never>;
|
|
85
|
-
export interface WithOpenAiOrDeterministicOptions extends WithOpenAiOptions {
|
|
86
|
-
readonly fallbackModel: string;
|
|
87
|
-
readonly fallbackProvider?: string;
|
|
88
|
-
}
|
|
89
|
-
export declare const withOpenAiOrDeterministic: (options: WithOpenAiOrDeterministicOptions) => Layer.Layer<ModelRegistry.Service, never, never>;
|
|
1
|
+
export type { AnthropicInput, WithAnthropicOptions } from "@batonfx/providers/anthropic";
|
|
2
|
+
export { anthropic, anthropicClientLayerConfig, withAnthropic } from "@batonfx/providers/anthropic";
|
|
3
|
+
export type { DeterministicInput, WithOpenAiOrDeterministicOptions } from "@batonfx/providers/deterministic";
|
|
4
|
+
export { deterministicModel, withDeterministic, withOpenAiOrDeterministic } from "@batonfx/providers/deterministic";
|
|
5
|
+
export type { OpenAiInput, RegistrationOptions, WithOpenAiOptions } from "@batonfx/providers/openai";
|
|
6
|
+
export { openAi, openAiClientLayerConfig, withOpenAi } from "@batonfx/providers/openai";
|
|
7
|
+
export type { OpenAiCompatibleInput, WithOpenAiCompatibleOptions } from "@batonfx/providers/openai-compat";
|
|
8
|
+
export { openAiCompatible, openAiCompatibleClientLayerConfig, withOpenAiCompatible, } from "@batonfx/providers/openai-compat";
|
|
9
|
+
export type { OpenRouterInput, WithOpenRouterOptions } from "@batonfx/providers/openrouter";
|
|
10
|
+
export { openRouter, openRouterClientLayerConfig, withOpenRouter } from "@batonfx/providers/openrouter";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@relayfx/sdk",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -21,18 +21,20 @@
|
|
|
21
21
|
"typecheck": "bun tsc --noEmit"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"@effect/ai-
|
|
27
|
-
"@effect/ai-
|
|
28
|
-
"@effect/
|
|
24
|
+
"@batonfx/core": "0.1.0",
|
|
25
|
+
"@batonfx/providers": "0.1.0",
|
|
26
|
+
"@effect/ai-anthropic": "4.0.0-beta.93",
|
|
27
|
+
"@effect/ai-openai": "4.0.0-beta.93",
|
|
28
|
+
"@effect/ai-openai-compat": "4.0.0-beta.93",
|
|
29
|
+
"@effect/ai-openrouter": "4.0.0-beta.93",
|
|
30
|
+
"@effect/sql-pg": "4.0.0-beta.93",
|
|
29
31
|
"drizzle-orm": "1.0.0-rc.3",
|
|
30
|
-
"effect": "4.0.0-beta.
|
|
32
|
+
"effect": "4.0.0-beta.93",
|
|
31
33
|
"pg": "8.21.0"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
|
-
"@effect/platform-bun": "4.0.0-beta.
|
|
35
|
-
"@effect/vitest": "4.0.0-beta.
|
|
36
|
+
"@effect/platform-bun": "4.0.0-beta.93",
|
|
37
|
+
"@effect/vitest": "4.0.0-beta.93",
|
|
36
38
|
"@relayfx/ai": "0.0.0",
|
|
37
39
|
"@relayfx/runtime": "0.0.0",
|
|
38
40
|
"@relayfx/schema": "0.0.0",
|