@blaxel/langgraph 0.2.50-dev.215 → 0.2.50-preview.115
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 +1 -1
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/model/cohere.js +74 -0
- package/dist/cjs/model/google-genai.js +75 -12
- package/dist/cjs/model.js +1 -1
- package/dist/cjs/types/model/google-genai.d.ts +20 -3
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/model/cohere.js +74 -0
- package/dist/esm/model/google-genai.js +74 -11
- package/dist/esm/model.js +1 -1
- package/package.json +3 -2
- package/dist/cjs/model/google-genai/chat_models.js +0 -766
- package/dist/cjs/model/google-genai/embeddings.js +0 -111
- package/dist/cjs/model/google-genai/index.js +0 -18
- package/dist/cjs/model/google-genai/output_parsers.js +0 -51
- package/dist/cjs/model/google-genai/types.js +0 -2
- package/dist/cjs/model/google-genai/utils/common.js +0 -390
- package/dist/cjs/model/google-genai/utils/tools.js +0 -110
- package/dist/cjs/model/google-genai/utils/zod_to_genai_parameters.js +0 -46
- package/dist/cjs/types/model/google-genai/chat_models.d.ts +0 -557
- package/dist/cjs/types/model/google-genai/embeddings.d.ts +0 -94
- package/dist/cjs/types/model/google-genai/index.d.ts +0 -2
- package/dist/cjs/types/model/google-genai/output_parsers.d.ts +0 -20
- package/dist/cjs/types/model/google-genai/types.d.ts +0 -3
- package/dist/cjs/types/model/google-genai/utils/common.d.ts +0 -22
- package/dist/cjs/types/model/google-genai/utils/tools.d.ts +0 -10
- package/dist/cjs/types/model/google-genai/utils/zod_to_genai_parameters.d.ts +0 -13
- package/dist/esm/model/google-genai/chat_models.js +0 -762
- package/dist/esm/model/google-genai/embeddings.js +0 -107
- package/dist/esm/model/google-genai/index.js +0 -2
- package/dist/esm/model/google-genai/output_parsers.js +0 -47
- package/dist/esm/model/google-genai/types.js +0 -1
- package/dist/esm/model/google-genai/utils/common.js +0 -381
- package/dist/esm/model/google-genai/utils/tools.js +0 -107
- package/dist/esm/model/google-genai/utils/zod_to_genai_parameters.js +0 -41
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BaseLLMOutputParser } from "@langchain/core/output_parsers";
|
|
2
|
-
import { JsonOutputKeyToolsParserParams } from "@langchain/core/output_parsers/openai_tools";
|
|
3
|
-
import { ChatGeneration } from "@langchain/core/outputs";
|
|
4
|
-
import type { z } from "zod";
|
|
5
|
-
interface GoogleGenerativeAIToolsOutputParserParams<T extends Record<string, any>> extends JsonOutputKeyToolsParserParams<T> {
|
|
6
|
-
}
|
|
7
|
-
export declare class GoogleGenerativeAIToolsOutputParser<T extends Record<string, any> = Record<string, any>> extends BaseLLMOutputParser<T> {
|
|
8
|
-
static lc_name(): string;
|
|
9
|
-
lc_namespace: string[];
|
|
10
|
-
returnId: boolean;
|
|
11
|
-
/** The type of tool calls to return. */
|
|
12
|
-
keyName: string;
|
|
13
|
-
/** Whether to return only the first tool call. */
|
|
14
|
-
returnSingle: boolean;
|
|
15
|
-
zodSchema?: z.ZodType<T>;
|
|
16
|
-
constructor(params: GoogleGenerativeAIToolsOutputParserParams<T>);
|
|
17
|
-
protected _validateResult(result: unknown): Promise<T>;
|
|
18
|
-
parseResult(generations: ChatGeneration[]): Promise<T>;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { CodeExecutionTool, FunctionDeclarationsTool as GoogleGenerativeAIFunctionDeclarationsTool, GoogleSearchRetrievalTool } from "@google/generative-ai";
|
|
2
|
-
import { BindToolsInput } from "@langchain/core/language_models/chat_models";
|
|
3
|
-
export type GoogleGenerativeAIToolType = BindToolsInput | GoogleGenerativeAIFunctionDeclarationsTool | CodeExecutionTool | GoogleSearchRetrievalTool;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Content, EnhancedGenerateContentResponse, POSSIBLE_ROLES, Part, type FunctionDeclarationsTool as GoogleGenerativeAIFunctionDeclarationsTool } from "@google/generative-ai";
|
|
2
|
-
import { BaseMessage, UsageMetadata } from "@langchain/core/messages";
|
|
3
|
-
import { ChatGenerationChunk, ChatResult } from "@langchain/core/outputs";
|
|
4
|
-
import { GoogleGenerativeAIToolType } from "../types.js";
|
|
5
|
-
export declare function getMessageAuthor(message: BaseMessage): string;
|
|
6
|
-
/**
|
|
7
|
-
* Maps a message type to a Google Generative AI chat author.
|
|
8
|
-
* @param message The message to map.
|
|
9
|
-
* @param model The model to use for mapping.
|
|
10
|
-
* @returns The message type mapped to a Google Generative AI chat author.
|
|
11
|
-
*/
|
|
12
|
-
export declare function convertAuthorToRole(author: string): (typeof POSSIBLE_ROLES)[number];
|
|
13
|
-
export declare function convertMessageContentToParts(message: BaseMessage, isMultimodalModel: boolean): Part[];
|
|
14
|
-
export declare function convertBaseMessagesToContent(messages: BaseMessage[], isMultimodalModel: boolean, convertSystemMessageToHumanContent?: boolean): Content[];
|
|
15
|
-
export declare function mapGenerateContentResultToChatResult(response: EnhancedGenerateContentResponse, extra?: {
|
|
16
|
-
usageMetadata: UsageMetadata | undefined;
|
|
17
|
-
}): ChatResult;
|
|
18
|
-
export declare function convertResponseContentToChatGenerationChunk(response: EnhancedGenerateContentResponse, extra: {
|
|
19
|
-
usageMetadata?: UsageMetadata | undefined;
|
|
20
|
-
index: number;
|
|
21
|
-
}): ChatGenerationChunk | null;
|
|
22
|
-
export declare function convertToGenerativeAITools(tools: GoogleGenerativeAIToolType[]): GoogleGenerativeAIFunctionDeclarationsTool[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Tool as GenerativeAITool, ToolConfig } from "@google/generative-ai";
|
|
2
|
-
import { ToolChoice } from "@langchain/core/language_models/chat_models";
|
|
3
|
-
import { GoogleGenerativeAIToolType } from "../types.js";
|
|
4
|
-
export declare function convertToolsToGenAI(tools: GoogleGenerativeAIToolType[], extra?: {
|
|
5
|
-
toolChoice?: ToolChoice;
|
|
6
|
-
allowedFunctionNames?: string[];
|
|
7
|
-
}): {
|
|
8
|
-
tools: GenerativeAITool[];
|
|
9
|
-
toolConfig?: ToolConfig;
|
|
10
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type SchemaType as FunctionDeclarationSchemaType, type FunctionDeclarationSchema as GenerativeAIFunctionDeclarationSchema } from "@google/generative-ai";
|
|
2
|
-
import type { z } from "zod";
|
|
3
|
-
export interface GenerativeAIJsonSchema extends Record<string, unknown> {
|
|
4
|
-
properties?: Record<string, GenerativeAIJsonSchema>;
|
|
5
|
-
type: FunctionDeclarationSchemaType;
|
|
6
|
-
}
|
|
7
|
-
export interface GenerativeAIJsonSchemaDirty extends GenerativeAIJsonSchema {
|
|
8
|
-
properties?: Record<string, GenerativeAIJsonSchemaDirty>;
|
|
9
|
-
additionalProperties?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function removeAdditionalProperties(obj: Record<string, unknown>): GenerativeAIJsonSchema;
|
|
12
|
-
export declare function zodToGenerativeAIParameters(zodObj: z.ZodType<any>): GenerativeAIFunctionDeclarationSchema;
|
|
13
|
-
export declare function jsonSchemaToGeminiParameters(schema: Record<string, any>): GenerativeAIFunctionDeclarationSchema;
|