gitbrent / PptxGenJS

Create PowerPoint presentations with a powerful, concise JavaScript API.
https://gitbrent.github.io/PptxGenJS/
MIT License
2.99k stars 643 forks source link

[Question] Is there a default AzureOpenAiChatOptions available? #1353

Closed zhengjian2016 closed 1 month ago

zhengjian2016 commented 1 month ago

About below code:

chatClient = ChatClient.create(chatModel);
chatClient = ChatClient.builder(chatModel).build();

It's working for OpenAiChatModel and OllamaChatModel

Actually, it was working for AzureOpenAiChatModel as well before spring-ai-azure-openai-1.0.0-20240925 , but I'm not sure what date the jar was from. But it isn't working for AzureOpenAiChatModel now, due to the following error: "responseFormat must not be null"

It's from the following class: spring-ai-azure-openai/1.0.0-SNAPSHOT /spring-ai-azure-openai-1.0.0-20240925.165056-619.jar! /org/springframework/ai/azure/openai/AzureOpenAiChatOptions.class

Assert.notNull(responseFormat, "responseFormat must not be null");

Is there a default AzureOpenAiChatOptions available?

Issue Category

Product Versions

Desired Behavior

Actually, I want to use the default AzureOpenAiChatOptions without having to set them myself, as I don't know how to properly configure them. I currently don't care about these options, but:

Is there a default AzureOpenAiChatOptions available?

Observed Behavior

I've tried below approach but it's not working:

AzureOpenAiChatOptions.ResponseFormat responseFormat = AzureOpenAiChatOptions.ResponseFormat.TEXT;
AzureOpenAiChatOptions chatOptions = AzureOpenAiChatOptions.builder()
    .withDeploymentName("gpt-4o")
    .withTemperature(0.7)
    .withResponseFormat(responseFormat)
    .build();

I got the following error: "seed must not be null"

zhengjian2016 commented 1 month ago

I got the wrong place.