@budibase/pro 3.23.0 → 3.23.2
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/ai/index.d.ts +1 -1
- package/dist/ai/llm.d.ts +4 -2
- package/dist/ai/models/anthropic.d.ts +3 -3
- package/dist/ai/models/base.d.ts +3 -3
- package/dist/ai/models/budibaseai.d.ts +4 -3
- package/dist/ai/models/openai.d.ts +5 -6
- package/dist/index.js +17 -17
- package/dist/types/ai.d.ts +1 -18
- package/package.json +2 -2
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./utils";
|
|
2
2
|
export * from "./prompts";
|
|
3
3
|
export { parseResponseFormat } from "./models/openai";
|
|
4
|
-
export { getLLM, getLLMConfig, getLLMOrThrow, LLMRequest } from "./llm";
|
|
4
|
+
export { getLLM, getLLMConfig, getLLMOrThrow, LLMRequest, getChatLLM, } from "./llm";
|
|
5
5
|
export { LLM } from "./models/base";
|
|
6
6
|
export * from "./prompts";
|
|
7
7
|
export * from "./generators";
|
package/dist/ai/llm.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { ChatCompletionRequest, LLMConfigOptions, LLMProviderConfig, Message, ResponseFormat, Tool } from "@budibase/types";
|
|
2
|
-
import { LLM } from "./models/base";
|
|
1
|
+
import { ChatCompletionRequest, LLMConfigOptions, LLMProviderConfig, Message, ResponseFormat, Tool, WithRequired } from "@budibase/types";
|
|
3
2
|
import openai from "openai";
|
|
4
3
|
import { z } from "zod";
|
|
4
|
+
import { LLM } from "./models/base";
|
|
5
|
+
import { OpenAI } from "./models/openai";
|
|
5
6
|
export declare function getLLMConfig(): Promise<LLMProviderConfig | undefined>;
|
|
6
7
|
export declare function getLLM(options?: LLMConfigOptions): Promise<LLM | undefined>;
|
|
7
8
|
export declare function getLLMOrThrow(): Promise<LLM>;
|
|
9
|
+
export declare function getChatLLM(config: WithRequired<LLMConfigOptions, "baseUrl">): Promise<OpenAI>;
|
|
8
10
|
export declare function getOpenAIUsingLocalAPIKey(): Promise<LLM | undefined>;
|
|
9
11
|
export declare class LLMRequest {
|
|
10
12
|
messages: Message[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import AnthropicClient from "@anthropic-ai/sdk";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { LLMConfigOptions, LLMStreamChunk } from "@budibase/types";
|
|
3
|
+
import { LLMFullResponse } from "../../types/ai";
|
|
4
4
|
import { LLMRequest } from "../llm";
|
|
5
|
-
import {
|
|
5
|
+
import { LLM } from "./base";
|
|
6
6
|
export type AnthropicModel = "claude-3-5-sonnet-20240620" | "claude-3-sonnet-20240229" | "claude-3-opus-20240229" | "claude-3-haiku-20240307";
|
|
7
7
|
export declare class Anthropic extends LLM {
|
|
8
8
|
private client;
|
package/dist/ai/models/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AIFieldMetadata, EnrichedBinding, LLMConfigOptions, Row, Snippet } from "@budibase/types";
|
|
2
|
-
import { LLMFullResponse, LLMPromptResponse, LLMStreamChunk } from "../../types/ai";
|
|
3
|
-
import { LLMRequest } from "../llm";
|
|
1
|
+
import { AIFieldMetadata, EnrichedBinding, LLMConfigOptions, LLMStreamChunk, Row, Snippet } from "@budibase/types";
|
|
4
2
|
import { Readable } from "node:stream";
|
|
3
|
+
import { LLMFullResponse, LLMPromptResponse } from "../../types/ai";
|
|
4
|
+
import { LLMRequest } from "../llm";
|
|
5
5
|
export declare abstract class LLM {
|
|
6
6
|
protected _model: string;
|
|
7
7
|
protected _apiKey?: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LLM } from "./base";
|
|
3
|
-
import { LLMRequest } from "../llm";
|
|
1
|
+
import { LLMStreamChunk } from "@budibase/types";
|
|
4
2
|
import { Readable } from "node:stream";
|
|
3
|
+
import { LLMFullResponse, LLMPromptResponse } from "../../types/ai";
|
|
4
|
+
import { LLMRequest } from "../llm";
|
|
5
|
+
import { LLM } from "./base";
|
|
5
6
|
export declare class BudibaseAI extends LLM {
|
|
6
7
|
prompt(prompt: string | LLMRequest): Promise<LLMPromptResponse>;
|
|
7
8
|
chat(prompt: LLMRequest): Promise<LLMFullResponse>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { LLMFullResponse, LLMStreamChunk } from "../../types/ai";
|
|
3
|
-
import { LLM } from "./base";
|
|
4
|
-
import { LLMRequest } from "../llm";
|
|
5
|
-
import { LLMConfigOptions, ResponseFormat } from "@budibase/types";
|
|
6
|
-
import openai from "openai";
|
|
1
|
+
import { LLMConfigOptions, LLMStreamChunk, ResponseFormat } from "@budibase/types";
|
|
7
2
|
import { Readable } from "node:stream";
|
|
3
|
+
import { default as openai, default as OpenAIClient } from "openai";
|
|
4
|
+
import { LLMFullResponse } from "../../types/ai";
|
|
5
|
+
import { LLMRequest } from "../llm";
|
|
6
|
+
import { LLM } from "./base";
|
|
8
7
|
export type OpenAIModel = "gpt-4o-mini" | "gpt-4o" | "gpt-4" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4-turbo" | "gpt-3.5-turbo" | "gpt-5" | "gpt-5-mini" | "gpt-5-nano";
|
|
9
8
|
export declare enum GPT_5_MODELS {
|
|
10
9
|
GPT_5_MINI = "gpt-5-mini",
|