Skip to content

Commit 97c19fa

Browse files
committed
Configured model as optional
1 parent 8da0843 commit 97c19fa

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mtengines",
33
"productName": "MTEngines",
4-
"version": "4.2.0",
4+
"version": "4.3.0",
55
"description": "Machine Translation (MT) library written in TypeScript",
66
"type": "module",
77
"keywords": [

ts/MistralTranslator.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ export class MistralTranslator implements MTEngine {
2222
srcLang: string = '';
2323
tgtLang: string = '';
2424

25-
constructor(apiKey: string) {
25+
constructor(apiKey: string, model?: string) {
2626
this.apiKey = apiKey;
27+
if (model) {
28+
this.model = model;
29+
}
2730
}
2831

2932
setModel(model: string): void {

0 commit comments

Comments
 (0)