Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groq[minor]: Update bindTools typing to include openai tools format #5855

Merged
merged 2 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/langchain-groq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"author": "LangChain",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there! 👋 I noticed the dependency change for "@langchain/core" in the package.json file. This seems to be a change in the peer/dev/hard dependency, and I've flagged it for the maintainers to review. Keep up the great work! 🚀

"license": "MIT",
"dependencies": {
"@langchain/core": ">0.1.56 <0.3.0",
"@langchain/core": ">=0.2.9 <0.3.0",
"@langchain/openai": "~0.1.0",
"groq-sdk": "^0.3.2",
"zod": "^3.22.4",
Expand Down
7 changes: 6 additions & 1 deletion libs/langchain-groq/src/chat_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import {
BaseLanguageModelInput,
FunctionDefinition,
StructuredOutputMethodOptions,
ToolDefinition,
} from "@langchain/core/language_models/base";
import {
BaseLLMOutputParser,
Expand Down Expand Up @@ -367,7 +368,11 @@ export class ChatGroq extends BaseChatModel<
}

override bindTools(
tools: (Record<string, unknown> | StructuredToolInterface)[],
tools: (
| Record<string, unknown>
| StructuredToolInterface
| ToolDefinition
)[],
kwargs?: Partial<ChatGroqCallOptions>
): Runnable<BaseLanguageModelInput, AIMessageChunk, ChatGroqCallOptions> {
return this.bind({
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10401,7 +10401,7 @@ __metadata:
resolution: "@langchain/groq@workspace:libs/langchain-groq"
dependencies:
"@jest/globals": ^29.5.0
"@langchain/core": ">0.1.56 <0.3.0"
"@langchain/core": ">=0.2.9 <0.3.0"
"@langchain/openai": "workspace:^"
"@langchain/scripts": ~0.0.14
"@langchain/standard-tests": 0.0.0
Expand Down
Loading