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 @@ -77,6 +77,7 @@ public OpenAiApi openAiApi(OpenAiConnectionProperties commonProperties, OpenAiCh
.headers(resolved.headers())
.completionsPath(chatProperties.getCompletionsPath())
.embeddingsPath(OpenAiEmbeddingProperties.DEFAULT_EMBEDDINGS_PATH)
.responsesPath(chatProperties.getResponsesPath())
.restClientBuilder(restClientBuilderProvider.getIfAvailable(RestClient::builder))
.webClientBuilder(webClientBuilderProvider.getIfAvailable(WebClient::builder))
.responseErrorHandler(responseErrorHandler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ public class OpenAiChatProperties extends OpenAiParentProperties {

public static final String DEFAULT_COMPLETIONS_PATH = "/v1/chat/completions";

public static final String DEFAULT_RESPONSES_PATH = "/v1/responses";

private String completionsPath = DEFAULT_COMPLETIONS_PATH;

private String responsesPath = DEFAULT_RESPONSES_PATH;

@NestedConfigurationProperty
private final OpenAiChatOptions options = OpenAiChatOptions.builder().model(DEFAULT_CHAT_MODEL).build();

Expand All @@ -46,4 +50,12 @@ public void setCompletionsPath(String completionsPath) {
this.completionsPath = completionsPath;
}

public String getResponsesPath() {
return this.responsesPath;
}

public void setResponsesPath(String responsesPath) {
this.responsesPath = responsesPath;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ private OpenAiApi openAiApi(OpenAiEmbeddingProperties embeddingProperties,
.headers(resolved.headers())
.completionsPath(OpenAiChatProperties.DEFAULT_COMPLETIONS_PATH)
.embeddingsPath(embeddingProperties.getEmbeddingsPath())
.responsesPath(OpenAiChatProperties.DEFAULT_RESPONSES_PATH)
.restClientBuilder(restClientBuilder)
.webClientBuilder(webClientBuilder)
.responseErrorHandler(responseErrorHandler)
Expand Down
Loading