Skip to content

Commit a320ee2

Browse files
fix(cohere): bump client version (#4786)
* fix(cohere): bump client version * Fix build --------- Co-authored-by: jacoblee93 <[email protected]>
1 parent a0cfea2 commit a320ee2

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

libs/langchain-cohere/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"license": "MIT",
4040
"dependencies": {
4141
"@langchain/core": "~0.1",
42-
"cohere-ai": "^7.6.2"
42+
"cohere-ai": "^7.8.0"
4343
},
4444
"devDependencies": {
4545
"@jest/globals": "^29.5.0",

libs/langchain-cohere/src/chat_models.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,12 @@ export class ChatCohere<
150150
invocationParams(options: this["ParsedCallOptions"]) {
151151
const params = {
152152
model: this.model,
153-
preambleOverride: options.preambleOverride,
153+
preamble: options.preamble,
154154
conversationId: options.conversationId,
155155
promptTruncation: options.promptTruncation,
156156
connectors: options.connectors,
157157
searchQueriesOnly: options.searchQueriesOnly,
158158
documents: options.documents,
159-
citationQuality: options.citationQuality,
160159
temperature: options.temperature ?? this.temperature,
161160
};
162161
// Filter undefined entries

libs/langchain-cohere/src/embeddings.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ export class CohereEmbeddings
8686
this.embeddingWithRetry({
8787
model: this.model,
8888
texts: batch,
89-
inputType: this.inputType,
89+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
90+
inputType: this.inputType as any,
9091
})
9192
);
9293

@@ -118,7 +119,8 @@ export class CohereEmbeddings
118119
const { embeddings } = await this.embeddingWithRetry({
119120
model: this.model,
120121
texts: [text],
121-
inputType: this.inputType,
122+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
123+
inputType: this.inputType as any,
122124
});
123125
if ("float" in embeddings && embeddings.float) {
124126
return embeddings.float[0];

libs/langchain-cohere/src/llms.ts

-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ export class Cohere extends LLM<CohereCallOptions> implements CohereInput {
113113
frequencyPenalty: options.frequencyPenalty,
114114
presencePenalty: options.presencePenalty,
115115
returnLikelihoods: options.returnLikelihoods,
116-
logitBias: options.logitBias,
117116
};
118117
// Filter undefined entries
119118
return Object.fromEntries(

yarn.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -8899,7 +8899,7 @@ __metadata:
88998899
"@tsconfig/recommended": ^1.0.3
89008900
"@typescript-eslint/eslint-plugin": ^6.12.0
89018901
"@typescript-eslint/parser": ^6.12.0
8902-
cohere-ai: ^7.6.2
8902+
cohere-ai: ^7.8.0
89038903
dotenv: ^16.3.1
89048904
dpdm: ^3.12.0
89058905
eslint: ^8.33.0
@@ -18176,16 +18176,16 @@ __metadata:
1817618176
languageName: node
1817718177
linkType: hard
1817818178

18179-
"cohere-ai@npm:^7.6.2":
18180-
version: 7.6.2
18181-
resolution: "cohere-ai@npm:7.6.2"
18179+
"cohere-ai@npm:^7.8.0":
18180+
version: 7.8.0
18181+
resolution: "cohere-ai@npm:7.8.0"
1818218182
dependencies:
1818318183
form-data: 4.0.0
1818418184
js-base64: 3.7.2
1818518185
node-fetch: 2.7.0
1818618186
qs: 6.11.2
1818718187
url-join: 4.0.1
18188-
checksum: cf70c115ddc50162f9fa7df5d2d569417ab68000dc4ca1a93646c457b61f691fd91cf5f73d69fd225d8224c05c105f74d7ca5a7700e6c0f4b37df70aa3d4fb48
18188+
checksum: dc2f612fe209329542a45c0c600cc5eb65cce138f935e9a254c0a992000de28d298ed961acb9d58d19d84b26e981c6fa39f8ac29adb82f2ffe5495b11dc58766
1818918189
languageName: node
1819018190
linkType: hard
1819118191

0 commit comments

Comments
 (0)