-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: [OpenAI] Integrate Messaging Convenience #326
base: main
Are you sure you want to change the base?
Conversation
...on-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiContentItem.java
Show resolved
Hide resolved
bb53787
to
2b4b12b
Compare
60f9d72
to
c99cbb8
Compare
- controller linked to new openai service only
- Move Jackson object initialization to field declaration - update `streamChatCompletionDeltas` in `NewOpenAiService` to use basic string message - `@deprecated` tag on deprecated `chatCompletion` doc - `@Deprecated` annotation on embedding api in client - `OpenAiController` streamChatCompletionDeltas emits usage
- make jackson mixin package private
…g unstable classes
- Use Old OpenAiService - Adapt tests
b3ead80
to
f33bfad
Compare
- Enums over string values in test - missed getContent assertion - replicate history test in old api test - Remove `@Value` from OpenAiChatCompletionDelta
…r visibility - follow createX naming format over toX. - move openai object mapper construction logic to utility method - make OpenAiChatCompletionDelta constructor access package private
- remove docs for overriding methods
- Add user, assistant and system conv on par with orchestration - Adapt sample app service class for image input (new api) - Adapt toDTO to account for OpenAI gen model architecture
- Throw on unsupported content item - improve code quality user message to DTO mapper - Add unit tests for messaging convenience api
538545c
to
11c93c1
Compare
…nai-conv-api-msg # Conflicts: # foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiAssistantMessage.java # foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiMessage.java # foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiSystemMessage.java # foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiUserMessage.java # sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/NewOpenAiTest.java # sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/services/NewOpenAiService.java
@@ -3,34 +3,23 @@ | |||
import static com.sap.ai.sdk.foundationmodels.openai.OpenAiModel.GPT_35_TURBO; |
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.
This service class is in the test directory. Also I thought we wanted to remove NewXXX
as a name
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.
The service class was intentionally moved to test dir, so we keep the e2e testing of the new api but not yet present it in the sample app.
I am open to any naming suggestions. eg:
OpenAiServiceV2
, OpenAiV2Test
OpenAiServiceBeta
, OpenAiBetaTest
OpenAiServiceGenerated
, OpenAiGeneratedTest
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.
I have opted of OpenAiServiceV2
and OpenAiV2Test
Context
AI/ai-sdk-java-backlog#172.
We have newly introduced a messaging API for orchestration. We would like to adapt the convenience to OpenAI module as well.
Feature scope:
Definition of Done
Aligned changes with the JavaScript SDK