Skip to content
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
21 changes: 16 additions & 5 deletions sdk_v2/js/docs/classes/AudioClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: AudioClient

Defined in: [openai/audioClient.ts:40](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/audioClient.ts#L40)
Defined in: [openai/audioClient.ts:40](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/audioClient.ts#L40)

Client for performing audio operations (transcription, translation) with a loaded model.
Follows the OpenAI Audio API structure.
Expand All @@ -17,10 +17,13 @@ Follows the OpenAI Audio API structure.

> **new AudioClient**(`modelId`, `coreInterop`): `AudioClient`

Defined in: [openai/audioClient.ts:50](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/audioClient.ts#L50)
Defined in: [openai/audioClient.ts:54](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/audioClient.ts#L54)

**`Internal`**

Restricted to internal use because CoreInterop is an internal implementation detail.
Users should create clients via the Model.createAudioClient() factory method.

#### Parameters

##### modelId
Expand All @@ -41,7 +44,7 @@ Defined in: [openai/audioClient.ts:50](https://github.com/microsoft/Foundry-Loca

> **settings**: [`AudioClientSettings`](AudioClientSettings.md)

Defined in: [openai/audioClient.ts:47](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/audioClient.ts#L47)
Defined in: [openai/audioClient.ts:47](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/audioClient.ts#L47)

Configuration settings for audio operations.

Expand All @@ -51,7 +54,7 @@ Configuration settings for audio operations.

> **transcribe**(`audioFilePath`): `Promise`\<`any`\>

Defined in: [openai/audioClient.ts:60](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/audioClient.ts#L60)
Defined in: [openai/audioClient.ts:75](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/audioClient.ts#L75)

Transcribes audio into the input language.

Expand All @@ -69,13 +72,17 @@ Path to the audio file to transcribe.

The transcription result.

#### Throws

Error - If audioFilePath is invalid or transcription fails.

***

### transcribeStreaming()

> **transcribeStreaming**(`audioFilePath`, `callback`): `Promise`\<`void`\>

Defined in: [openai/audioClient.ts:77](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/audioClient.ts#L77)
Defined in: [openai/audioClient.ts:98](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/audioClient.ts#L98)

Transcribes audio into the input language using streaming.

Expand All @@ -98,3 +105,7 @@ A callback function that receives each chunk of the streaming response.
`Promise`\<`void`\>

A promise that resolves when the stream is complete.

#### Throws

Error - If audioFilePath or callback are invalid, or streaming fails.
8 changes: 4 additions & 4 deletions sdk_v2/js/docs/classes/AudioClientSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: AudioClientSettings

Defined in: [openai/audioClient.ts:3](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/audioClient.ts#L3)
Defined in: [openai/audioClient.ts:3](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/audioClient.ts#L3)

## Constructors

Expand All @@ -24,23 +24,23 @@ Defined in: [openai/audioClient.ts:3](https://github.com/microsoft/Foundry-Local

> `optional` **language**: `string`

Defined in: [openai/audioClient.ts:4](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/audioClient.ts#L4)
Defined in: [openai/audioClient.ts:4](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/audioClient.ts#L4)

***

### temperature?

> `optional` **temperature**: `number`

Defined in: [openai/audioClient.ts:5](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/audioClient.ts#L5)
Defined in: [openai/audioClient.ts:5](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/audioClient.ts#L5)

## Methods

### \_serialize()

> **\_serialize**(): `object`

Defined in: [openai/audioClient.ts:11](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/audioClient.ts#L11)
Defined in: [openai/audioClient.ts:11](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/audioClient.ts#L11)

**`Internal`**

Expand Down
36 changes: 22 additions & 14 deletions sdk_v2/js/docs/classes/Catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: Catalog

Defined in: [catalog.ts:11](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/catalog.ts#L11)
Defined in: [catalog.ts:11](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/catalog.ts#L11)

Represents a catalog of AI models available in the system.
Provides methods to discover, list, and retrieve models and their variants.
Expand All @@ -17,7 +17,7 @@ Provides methods to discover, list, and retrieve models and their variants.

> **new Catalog**(`coreInterop`, `modelLoadManager`): `Catalog`

Defined in: [catalog.ts:20](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/catalog.ts#L20)
Defined in: [catalog.ts:20](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/catalog.ts#L20)

#### Parameters

Expand All @@ -41,7 +41,7 @@ Defined in: [catalog.ts:20](https://github.com/microsoft/Foundry-Local/blob/03d8

> **get** **name**(): `string`

Defined in: [catalog.ts:30](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/catalog.ts#L30)
Defined in: [catalog.ts:30](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/catalog.ts#L30)

Gets the name of the catalog.

Expand All @@ -57,7 +57,7 @@ The name of the catalog.

> **getCachedModels**(): `Promise`\<[`ModelVariant`](ModelVariant.md)[]\>

Defined in: [catalog.ts:108](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/catalog.ts#L108)
Defined in: [catalog.ts:126](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/catalog.ts#L126)

Retrieves a list of all locally cached model variants.
This method is asynchronous as it may involve file I/O or querying the underlying core.
Expand All @@ -74,7 +74,7 @@ A Promise that resolves to an array of cached ModelVariant objects.

> **getLoadedModels**(): `Promise`\<[`ModelVariant`](ModelVariant.md)[]\>

Defined in: [catalog.ts:134](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/catalog.ts#L134)
Defined in: [catalog.ts:152](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/catalog.ts#L152)

Retrieves a list of all currently loaded model variants.
This operation is asynchronous because checking the loaded status may involve querying
Expand All @@ -90,9 +90,9 @@ A Promise that resolves to an array of loaded ModelVariant objects.

### getModel()

> **getModel**(`alias`): `Promise`\<[`Model`](Model.md) \| `undefined`\>
> **getModel**(`alias`): `Promise`\<[`Model`](Model.md)\>

Defined in: [catalog.ts:87](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/catalog.ts#L87)
Defined in: [catalog.ts:88](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/catalog.ts#L88)

Retrieves a model by its alias.
This method is asynchronous as it may ensure the catalog is up-to-date by fetching from a remote service.
Expand All @@ -107,17 +107,21 @@ The alias of the model to retrieve.

#### Returns

`Promise`\<[`Model`](Model.md) \| `undefined`\>
`Promise`\<[`Model`](Model.md)\>

A Promise that resolves to the Model object if found, otherwise undefined.
A Promise that resolves to the Model object if found, otherwise throws an error.

#### Throws

Error - If alias is null, undefined, or empty.

***

### getModels()

> **getModels**(): `Promise`\<[`Model`](Model.md)[]\>

Defined in: [catalog.ts:76](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/catalog.ts#L76)
Defined in: [catalog.ts:76](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/catalog.ts#L76)

Lists all available models in the catalog.
This method is asynchronous as it may fetch the model list from a remote service or perform file I/O.
Expand All @@ -132,9 +136,9 @@ A Promise that resolves to an array of Model objects.

### getModelVariant()

> **getModelVariant**(`modelId`): `Promise`\<[`ModelVariant`](ModelVariant.md) \| `undefined`\>
> **getModelVariant**(`modelId`): `Promise`\<[`ModelVariant`](ModelVariant.md)\>

Defined in: [catalog.ts:98](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/catalog.ts#L98)
Defined in: [catalog.ts:108](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/catalog.ts#L108)

Retrieves a specific model variant by its ID.
This method is asynchronous as it may ensure the catalog is up-to-date by fetching from a remote service.
Expand All @@ -149,6 +153,10 @@ The unique identifier of the model variant.

#### Returns

`Promise`\<[`ModelVariant`](ModelVariant.md) \| `undefined`\>
`Promise`\<[`ModelVariant`](ModelVariant.md)\>

A Promise that resolves to the ModelVariant object if found, otherwise throws an error.

#### Throws

A Promise that resolves to the ModelVariant object if found, otherwise undefined.
Error - If modelId is null, undefined, or empty.
21 changes: 16 additions & 5 deletions sdk_v2/js/docs/classes/ChatClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: ChatClient

Defined in: [openai/chatClient.ts:50](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L50)
Defined in: [openai/chatClient.ts:50](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L50)

Client for performing chat completions with a loaded model.
Follows the OpenAI Chat Completion API structure.
Expand All @@ -17,10 +17,13 @@ Follows the OpenAI Chat Completion API structure.

> **new ChatClient**(`modelId`, `coreInterop`): `ChatClient`

Defined in: [openai/chatClient.ts:60](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L60)
Defined in: [openai/chatClient.ts:64](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L64)

**`Internal`**

Restricted to internal use because CoreInterop is an internal implementation detail.
Users should create clients via the Model.createChatClient() factory method.

#### Parameters

##### modelId
Expand All @@ -41,7 +44,7 @@ Defined in: [openai/chatClient.ts:60](https://github.com/microsoft/Foundry-Local

> **settings**: [`ChatClientSettings`](ChatClientSettings.md)

Defined in: [openai/chatClient.ts:57](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L57)
Defined in: [openai/chatClient.ts:57](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L57)

Configuration settings for chat completions.

Expand All @@ -51,7 +54,7 @@ Configuration settings for chat completions.

> **completeChat**(`messages`): `Promise`\<`any`\>

Defined in: [openai/chatClient.ts:70](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L70)
Defined in: [openai/chatClient.ts:96](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L96)

Performs a synchronous chat completion.

Expand All @@ -69,13 +72,17 @@ An array of message objects (e.g., { role: 'user', content: 'Hello' }).

The chat completion response object.

#### Throws

Error - If messages are invalid or completion fails.

***

### completeStreamingChat()

> **completeStreamingChat**(`messages`, `callback`): `Promise`\<`void`\>

Defined in: [openai/chatClient.ts:88](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L88)
Defined in: [openai/chatClient.ts:120](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L120)

Performs a streaming chat completion.

Expand All @@ -98,3 +105,7 @@ A callback function that receives each chunk of the streaming response.
`Promise`\<`void`\>

A promise that resolves when the stream is complete.

#### Throws

Error - If messages or callback are invalid, or streaming fails.
20 changes: 10 additions & 10 deletions sdk_v2/js/docs/classes/ChatClientSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: ChatClientSettings

Defined in: [openai/chatClient.ts:3](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L3)
Defined in: [openai/chatClient.ts:3](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L3)

## Constructors

Expand All @@ -24,71 +24,71 @@ Defined in: [openai/chatClient.ts:3](https://github.com/microsoft/Foundry-Local/

> `optional` **frequencyPenalty**: `number`

Defined in: [openai/chatClient.ts:4](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L4)
Defined in: [openai/chatClient.ts:4](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L4)

***

### maxTokens?

> `optional` **maxTokens**: `number`

Defined in: [openai/chatClient.ts:5](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L5)
Defined in: [openai/chatClient.ts:5](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L5)

***

### n?

> `optional` **n**: `number`

Defined in: [openai/chatClient.ts:6](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L6)
Defined in: [openai/chatClient.ts:6](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L6)

***

### presencePenalty?

> `optional` **presencePenalty**: `number`

Defined in: [openai/chatClient.ts:8](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L8)
Defined in: [openai/chatClient.ts:8](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L8)

***

### randomSeed?

> `optional` **randomSeed**: `number`

Defined in: [openai/chatClient.ts:9](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L9)
Defined in: [openai/chatClient.ts:9](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L9)

***

### temperature?

> `optional` **temperature**: `number`

Defined in: [openai/chatClient.ts:7](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L7)
Defined in: [openai/chatClient.ts:7](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L7)

***

### topK?

> `optional` **topK**: `number`

Defined in: [openai/chatClient.ts:10](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L10)
Defined in: [openai/chatClient.ts:10](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L10)

***

### topP?

> `optional` **topP**: `number`

Defined in: [openai/chatClient.ts:11](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L11)
Defined in: [openai/chatClient.ts:11](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L11)

## Methods

### \_serialize()

> **\_serialize**(): `object`

Defined in: [openai/chatClient.ts:17](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/openai/chatClient.ts#L17)
Defined in: [openai/chatClient.ts:17](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/openai/chatClient.ts#L17)

**`Internal`**

Expand Down
6 changes: 3 additions & 3 deletions sdk_v2/js/docs/classes/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: Configuration

Defined in: [configuration.ts:75](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/configuration.ts#L75)
Defined in: [configuration.ts:75](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/configuration.ts#L75)

**`Internal`**

Expand All @@ -16,7 +16,7 @@ Defined in: [configuration.ts:75](https://github.com/microsoft/Foundry-Local/blo

> **new Configuration**(`config`): `Configuration`

Defined in: [configuration.ts:78](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/configuration.ts#L78)
Defined in: [configuration.ts:78](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/configuration.ts#L78)

#### Parameters

Expand All @@ -34,7 +34,7 @@ Defined in: [configuration.ts:78](https://github.com/microsoft/Foundry-Local/blo

> **params**: `object`

Defined in: [configuration.ts:76](https://github.com/microsoft/Foundry-Local/blob/03d8abe494b495f2cafc516bcebbbb66a9b6662f/sdk_v2/js/src/configuration.ts#L76)
Defined in: [configuration.ts:76](https://github.com/microsoft/Foundry-Local/blob/a42a7bf2423d2b1da6cca82531f4977f139aef46/sdk_v2/js/src/configuration.ts#L76)

#### Index Signature

Expand Down
Loading