Skip to content

Commit 2f93d8d

Browse files
committed
style: fix prettier formatting and TSDoc syntax warnings
1 parent 6609f67 commit 2f93d8d

3 files changed

Lines changed: 28 additions & 28 deletions

File tree

plugins/mistral/src/llm.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ if (hasMistralApiKey) {
1313
});
1414
} else {
1515
describe('Mistral', () => {
16-
it.skip('requires MISTRAL_API_KEY', () => { });
16+
it.skip('requires MISTRAL_API_KEY', () => {});
1717
});
1818
}

plugins/mistral/src/llm.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ export class LLM extends llm.LLM {
7878
// Per-call overrides win over instance defaults
7979
const resolvedParallelToolCalls =
8080
parallelToolCalls !== undefined ? parallelToolCalls : this.#opts.parallelToolCalls;
81-
const resolvedToolChoice =
82-
toolChoice !== undefined ? toolChoice : this.#opts.toolChoice;
81+
const resolvedToolChoice = toolChoice !== undefined ? toolChoice : this.#opts.toolChoice;
8382

8483
return new LLMStream(this, {
8584
client: this.#client,
@@ -135,13 +134,13 @@ export class LLMStream extends llm.LLMStream {
135134
const tools: any[] | undefined =
136135
this.toolCtx && Object.keys(this.toolCtx).length > 0
137136
? Object.entries(this.toolCtx).map(([name, func]) => ({
138-
type: 'function' as const,
139-
function: {
140-
name,
141-
description: func.description,
142-
parameters: llm.toJsonSchema(func.parameters, true, false),
143-
},
144-
}))
137+
type: 'function' as const,
138+
function: {
139+
name,
140+
description: func.description,
141+
parameters: llm.toJsonSchema(func.parameters, true, false),
142+
},
143+
}))
145144
: undefined;
146145

147146
// Apply connection timeout only to the initial chat.stream() call so long
@@ -179,10 +178,7 @@ export class LLMStream extends llm.LLMStream {
179178
},
180179
{
181180
fetchOptions: {
182-
signal: AbortSignal.any([
183-
this.abortController.signal,
184-
connAbortController.signal,
185-
]),
181+
signal: AbortSignal.any([this.abortController.signal, connAbortController.signal]),
186182
},
187183
},
188184
);
@@ -252,7 +248,6 @@ export class LLMStream extends llm.LLMStream {
252248
inProgressCalls.clear();
253249
}
254250

255-
256251
// Regular streamed text
257252
if (typeof delta.content === 'string' && delta.content) {
258253
this.queue.put({
@@ -325,10 +320,12 @@ export class LLMStream extends llm.LLMStream {
325320
*
326321
* Mistral supports: 'auto' | 'none' | 'any'
327322
* LiveKit adds: 'required' (force at least one call) → maps to 'any'
328-
* { type: 'function', function: { name } } (named tool) → not supported, falls back to 'any'
323+
* \{ type: 'function', function: \{ name \} \} (named tool) → not supported, falls back to 'any'
329324
*/
330325
// eslint-disable-next-line @typescript-eslint/no-explicit-any
331-
function toMistralToolChoice(choice: llm.ToolChoice | undefined): 'auto' | 'none' | 'any' | undefined {
326+
function toMistralToolChoice(
327+
choice: llm.ToolChoice | undefined,
328+
): 'auto' | 'none' | 'any' | undefined {
332329
if (choice === undefined) return undefined;
333330
if (choice === 'auto') return 'auto';
334331
if (choice === 'none') return 'none';
@@ -348,7 +345,10 @@ function toMistralToolChoice(choice: llm.ToolChoice | undefined): 'auto' | 'none
348345
* FunctionCallOutput's name (defaults to '').
349346
*/
350347
// eslint-disable-next-line @typescript-eslint/no-explicit-any
351-
function buildMessages(chatCtx: llm.ChatContext, logger?: { warn: (...args: any[]) => void }): object[] {
348+
function buildMessages(
349+
chatCtx: llm.ChatContext,
350+
logger?: { warn: (msg: string) => void },
351+
): object[] {
352352
// eslint-disable-next-line @typescript-eslint/no-explicit-any
353353
const messages: any[] = [];
354354

plugins/mistral/src/models.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
// SPDX-License-Identifier: Apache-2.0
44

55
export type MistralChatModels =
6-
| 'mistral-large-latest'
7-
| 'mistral-medium-latest'
8-
| 'mistral-small-latest'
9-
| 'mistral-tiny-latest'
10-
| 'magistral-medium-latest'
11-
| 'magistral-small-latest'
12-
| 'ministral-3b-latest'
13-
| 'ministral-8b-latest'
14-
| 'open-mistral-nemo'
15-
| 'open-codestral-mamba';
6+
| 'mistral-large-latest'
7+
| 'mistral-medium-latest'
8+
| 'mistral-small-latest'
9+
| 'mistral-tiny-latest'
10+
| 'magistral-medium-latest'
11+
| 'magistral-small-latest'
12+
| 'ministral-3b-latest'
13+
| 'ministral-8b-latest'
14+
| 'open-mistral-nemo'
15+
| 'open-codestral-mamba';

0 commit comments

Comments
 (0)