Skip to content

Include Groq provider #17

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"@langchain/anthropic": "^0.3.9",
"@langchain/community": "^0.3.31",
"@langchain/core": "^0.3.40",
"@langchain/groq": "^0.1.2",
"@langchain/mistralai": "^0.1.1",
"@langchain/openai": "^0.4.4",
"@lumino/coreutils": "^2.1.2",
Expand Down
5 changes: 5 additions & 0 deletions scripts/settings-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ const providers = {
path: 'node_modules/@langchain/community/experimental/llms/chrome_ai.d.ts',
type: 'ChromeAIInputs'
},
Groq: {
path: 'node_modules/@langchain/groq/dist/chat_models.d.ts',
type: 'ChatGroqInput',
excludedProps: ['httpAgent']
},
MistralAI: {
path: 'node_modules/@langchain/mistralai/dist/chat_models.d.ts',
type: 'ChatMistralAIInput'
Expand Down
6 changes: 6 additions & 0 deletions src/llm-models/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ChatAnthropic } from '@langchain/anthropic';
import { ChromeAI } from '@langchain/community/experimental/llms/chrome_ai';
import { ChatGroq } from '@langchain/groq';
import { ChatMistralAI } from '@langchain/mistralai';
import { ChatOpenAI } from '@langchain/openai';

Expand Down Expand Up @@ -32,6 +33,11 @@ const AIProviders: IAIProvider[] = [
instructions: instructions.ChromeAI,
settingsSchema: ProviderSettings.ChromeAI
},
{
name: 'Groq',
chatModel: ChatGroq,
settingsSchema: ProviderSettings.Groq
},
{
name: 'MistralAI',
chatModel: ChatMistralAI,
Expand Down
40 changes: 39 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2110,6 +2110,7 @@ __metadata:
"@langchain/anthropic": ^0.3.9
"@langchain/community": ^0.3.31
"@langchain/core": ^0.3.40
"@langchain/groq": ^0.1.2
"@langchain/mistralai": ^0.1.1
"@langchain/openai": ^0.4.4
"@lumino/coreutils": ^2.1.2
Expand Down Expand Up @@ -2567,6 +2568,20 @@ __metadata:
languageName: node
linkType: hard

"@langchain/groq@npm:^0.1.2":
version: 0.1.3
resolution: "@langchain/groq@npm:0.1.3"
dependencies:
"@langchain/openai": ~0.3.0
groq-sdk: ^0.5.0
zod: ^3.22.4
zod-to-json-schema: ^3.22.5
peerDependencies:
"@langchain/core": ">=0.2.21 <0.4.0"
checksum: 29dc6c9fce60abcb10bc86c3c6107d1623be97bca539539ddbb0764bf539c01758b03a1c131f72794750f81815ebed19f4cd1109e0c408f2fe4861cb5ac66f4e
languageName: node
linkType: hard

"@langchain/mistralai@npm:^0.1.1":
version: 0.1.1
resolution: "@langchain/mistralai@npm:0.1.1"
Expand All @@ -2581,7 +2596,7 @@ __metadata:
languageName: node
linkType: hard

"@langchain/openai@npm:>=0.1.0 <0.4.0":
"@langchain/openai@npm:>=0.1.0 <0.4.0, @langchain/openai@npm:~0.3.0":
version: 0.3.17
resolution: "@langchain/openai@npm:0.3.17"
dependencies:
Expand Down Expand Up @@ -5748,6 +5763,22 @@ __metadata:
languageName: node
linkType: hard

"groq-sdk@npm:^0.5.0":
version: 0.5.0
resolution: "groq-sdk@npm:0.5.0"
dependencies:
"@types/node": ^18.11.18
"@types/node-fetch": ^2.6.4
abort-controller: ^3.0.0
agentkeepalive: ^4.2.1
form-data-encoder: 1.7.2
formdata-node: ^4.3.2
node-fetch: ^2.6.7
web-streams-polyfill: ^3.2.1
checksum: 051ca56e99e4a2440080943c831b109687dd346b24155d3f085113df1ad0639cb95724c14a05611f7314d340db8bf342af425eb11905c97bc6a6948cd7262f04
languageName: node
linkType: hard

"hard-rejection@npm:^2.1.0":
version: 2.1.0
resolution: "hard-rejection@npm:2.1.0"
Expand Down Expand Up @@ -8881,6 +8912,13 @@ __metadata:
languageName: node
linkType: hard

"web-streams-polyfill@npm:^3.2.1":
version: 3.3.3
resolution: "web-streams-polyfill@npm:3.3.3"
checksum: 21ab5ea08a730a2ef8023736afe16713b4f2023ec1c7085c16c8e293ee17ed085dff63a0ad8722da30c99c4ccbd4ccd1b2e79c861829f7ef2963d7de7004c2cb
languageName: node
linkType: hard

"webidl-conversions@npm:^3.0.0":
version: 3.0.1
resolution: "webidl-conversions@npm:3.0.1"
Expand Down