-
Notifications
You must be signed in to change notification settings - Fork 11
feat: Implementing minimal feature scope for Spring AI integration in OpenAI #526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… 1.0.0 (GA Version) (#503)"
… 1.0.0 (GA Version) (#503)"
… AI 1.0.0 (GA Version) (#503)".
…AiService + their corresponding passed tests in SpringAiOpenAiTest class. Regarding the OpenAiChatModel class it was just formatting, nothing changed.
--> 4 methods in OpenAiChatCompletionRequest.java return only this now and other constructors other than main are removed for now.
…ringopenai # Conflicts: # core/src/main/java/com/sap/ai/sdk/core/common/ClientResponseHandler.java
...ls/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/spring/OpenAiChatOptions.java
Outdated
Show resolved
Hide resolved
...dels/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiAssistantMessage.java
Outdated
Show resolved
Hide resolved
...n-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiFunctionCall.java
Outdated
Show resolved
Hide resolved
…onmodels/openai/spring/OpenAiChatModel.java Co-authored-by: Alexander Dümont <[email protected]>
…est.java failing. --> still fix of null of message.getText() in toAssistantMessage() method in OpenAiChatModel.java pending.
# Conflicts: # sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiAgenticWorkflowService.java
… into chatcompletion-for-springopenai
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, please have another reviewer- because I'm one of the contributors.
Please find my PR to reduce constructor visibility again in your branch:
#531
val options = new OpenAiChatOptions(); | ||
val prompt = | ||
new Prompt("Can you give me the first 100 numbers of the Fibonacci sequence?", options); | ||
return chatClient.call(prompt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return chatClient.call(prompt); | |
return chatClient.stream(prompt); |
You would also need to change the return type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I do stream , I have an exception (streaming is not supported as stream is not overridden at all in OpenAi so currently implementing it)
...dels/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiAssistantMessage.java
Outdated
Show resolved
Hide resolved
...dels/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiAssistantMessage.java
Outdated
Show resolved
Hide resolved
...openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiChatCompletionRequest.java
Outdated
Show resolved
Hide resolved
.../openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiChatCompletionConfig.java
Show resolved
Hide resolved
...n-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiFunctionCall.java
Outdated
Show resolved
Hide resolved
...ls/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/spring/OpenAiChatOptions.java
Show resolved
Hide resolved
public <T extends ChatOptions> T copy() { | ||
final OpenAiChatOptions copy = new OpenAiChatOptions(); | ||
copy.setToolCallbacks(this.toolCallbacks); | ||
copy.setInternalToolExecutionEnabled(this.internalToolExecutionEnabled); | ||
copy.setTools(this.tools); | ||
copy.setToolNames(this.toolNames); | ||
copy.setToolContext(this.toolContext); | ||
return (T) copy; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Minor)
Please also copy the config
and any other fields that was missed
* Reduce constructors * Update thresholds * Update javadoc and factory name
…to withStop() method.
… into chatcompletion-for-springopenai
Context
AI/ai-sdk-java-backlog#179.
Integrating SpringAi with our OpenAiClient.
Feature scope:
Definition of Done
Aligned changes with the JavaScript SDK