From 92a751bc8c14ff5ecdb759ba2df045daa82c7066 Mon Sep 17 00:00:00 2001 From: "marsal.sans" Date: Wed, 21 Aug 2024 09:03:48 +0200 Subject: [PATCH 1/3] feat(langchain-google-common): export GoogleAISafetyError type --- libs/langchain-google-common/src/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/langchain-google-common/src/types.ts b/libs/langchain-google-common/src/types.ts index 7721b5136704..00d4dfa29b66 100644 --- a/libs/langchain-google-common/src/types.ts +++ b/libs/langchain-google-common/src/types.ts @@ -4,7 +4,7 @@ import type { BindToolsInput, } from "@langchain/core/language_models/chat_models"; import type { JsonStream } from "./utils/stream.js"; - +import type { GoogleAISafetyError } from "./utils/safety.js"; /** * Parameters needed to setup the client connection. * AuthOptions are something like GoogleAuthOptions (from google-auth-library) @@ -327,7 +327,7 @@ export interface GoogleAISafetyHandler { */ handle(response: GoogleLLMResponse): GoogleLLMResponse; } - +export type { GoogleAISafetyError }; export interface GoogleAISafetyParams { safetyHandler?: GoogleAISafetyHandler; } From 7d870a8ac99bcd76a60196de6528064006ec0e12 Mon Sep 17 00:00:00 2001 From: "marsal.sans" Date: Wed, 21 Aug 2024 09:07:07 +0200 Subject: [PATCH 2/3] feat(langchain-google-common): export GoogleAISafetyError type --- libs/langchain-google-common/src/types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/langchain-google-common/src/types.ts b/libs/langchain-google-common/src/types.ts index 00d4dfa29b66..9ad298f26ddd 100644 --- a/libs/langchain-google-common/src/types.ts +++ b/libs/langchain-google-common/src/types.ts @@ -328,6 +328,7 @@ export interface GoogleAISafetyHandler { handle(response: GoogleLLMResponse): GoogleLLMResponse; } export type { GoogleAISafetyError }; + export interface GoogleAISafetyParams { safetyHandler?: GoogleAISafetyHandler; } From 3402a6cacb4652e87b1e2809305c8d378b23f8e6 Mon Sep 17 00:00:00 2001 From: "marsal.sans" Date: Wed, 21 Aug 2024 09:11:57 +0200 Subject: [PATCH 3/3] feat(langchain-google-common): export GoogleAISafetyError type --- libs/langchain-google-common/src/index.ts | 1 + libs/langchain-google-common/src/types.ts | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/langchain-google-common/src/index.ts b/libs/langchain-google-common/src/index.ts index 18e62d415f9d..373617c72e55 100644 --- a/libs/langchain-google-common/src/index.ts +++ b/libs/langchain-google-common/src/index.ts @@ -8,3 +8,4 @@ export * from "./types.js"; export * from "./utils/stream.js"; export * from "./utils/common.js"; export * from "./utils/zod_to_gemini_parameters.js"; +export * from "./utils/safety.js"; diff --git a/libs/langchain-google-common/src/types.ts b/libs/langchain-google-common/src/types.ts index 9ad298f26ddd..7721b5136704 100644 --- a/libs/langchain-google-common/src/types.ts +++ b/libs/langchain-google-common/src/types.ts @@ -4,7 +4,7 @@ import type { BindToolsInput, } from "@langchain/core/language_models/chat_models"; import type { JsonStream } from "./utils/stream.js"; -import type { GoogleAISafetyError } from "./utils/safety.js"; + /** * Parameters needed to setup the client connection. * AuthOptions are something like GoogleAuthOptions (from google-auth-library) @@ -327,7 +327,6 @@ export interface GoogleAISafetyHandler { */ handle(response: GoogleLLMResponse): GoogleLLMResponse; } -export type { GoogleAISafetyError }; export interface GoogleAISafetyParams { safetyHandler?: GoogleAISafetyHandler;