Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -997,9 +997,9 @@ private OpenAIChatMessageContent CreateChatMessageContent(OAIChat.ChatCompletion
return "audio/opus";
}

if (audioOptions.OutputAudioFormat == ChatOutputAudioFormat.Wav)
if (audioOptions.OutputAudioFormat == ChatOutputAudioFormat.Aac)
{
return "audio/wav";
return "audio/aac";
}

if (audioOptions.OutputAudioFormat == ChatOutputAudioFormat.Flac)
Expand All @@ -1012,7 +1012,7 @@ private OpenAIChatMessageContent CreateChatMessageContent(OAIChat.ChatCompletion
return "audio/pcm16";
}

throw new NotSupportedException($"Unsupported audio output format '{audioOptions.OutputAudioFormat}'. Supported formats are 'wav', 'mp3', 'opus', 'flac' and 'pcm16'.");
throw new NotSupportedException($"Unsupported audio output format '{audioOptions.OutputAudioFormat}'. Supported formats are 'wav', 'mp3', 'opus', 'aac', 'flac' and 'pcm16'.");
}

private OpenAIChatMessageContent CreateChatMessageContent(ChatMessageRole chatRole, string content, ChatToolCall[] toolCalls, FunctionCallContent[]? functionCalls, IReadOnlyDictionary<string, object?>? metadata, string? authorName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,9 @@ public KernelProcess(KernelProcessState state, IList<KernelProcessStepInfo> step
Verify.NotNullOrWhiteSpace(state.Name);

this.Steps = [.. steps];
if (threads is not null)
{
this.Threads = threads;
}
Comment on lines +53 to +56
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incomplete fix / test gap: This only addresses the direct-constructor path. LocalProcess.ToKernelProcessAsync already passes this._process.Threads (LocalProcess.cs:611), but Dapr round-trips still serialize only Steps (DaprProcessInfo.cs:21) and rebuild KernelProcess without threads (DaprProcessInfo.cs:57); ProcessStateMetadataFactory likewise persists only StepsState. If the goal is to preserve threads across snapshots/resume, Threads should be added to the persisted/transport models. At minimum, add a regression test that constructs a KernelProcess with a non-null threads argument and asserts process.Threads matches.

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,7 @@ public async Task<KernelSearchResults<TextSearchResult>> GetTextSearchResultsAsy
var searchResult = await this.SearchInternalAsync(query, searchOptions, cancellationToken).ConfigureAwait(false);

var results = searchResult.Select(x => new TextSearchResult(x.Text ?? string.Empty) { Name = x.SourceName, Link = x.SourceLink });
return new(searchResult.Select(x =>
new TextSearchResult(x.Text ?? string.Empty)
{
Name = x.SourceName,
Link = x.SourceLink
}).ToAsyncEnumerable());
return new(results.ToAsyncEnumerable());
}

/// <inheritdoc/>
Expand Down
Loading