-
-
Notifications
You must be signed in to change notification settings - Fork 123
Description
What would you like to be added:
There isn't any solution to pass ResponseFormat3 and/or JsonSerializerContext to LangChain.Providers.OpenAI.OpenAiChatModel.GenerateAsync method.
The method signature does not provide for them and ChatRequest parameter doesn't have these parameters.
You can for example add a new signature like this:
public async IAsyncEnumerable GenerateAsync(
ResponseFormat3? responseFormat, // Added
JsonSerializerContext? jsonSerializerContext, // Added
bool? strict, // Added
ChatRequest request,
ChatSettings? settings = null,
[EnumeratorCancellation] CancellationToken cancellationToken = default)
And add related code to add responseFormat when instance CreateChatCompletionRequest and to provider.Client.Chat.JsonSerializerContext in LangChain.Providers.OpenAI.OpenAiChatModel class
Thanks a lot.
Andrew