Skip to content
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

Added Response Convenience #157

Merged
merged 10 commits into from
Nov 18, 2024
Merged

Added Response Convenience #157

merged 10 commits into from
Nov 18, 2024

Conversation

Jonas-Isr
Copy link
Member

@Jonas-Isr Jonas-Isr commented Nov 13, 2024

Context

AI/ai-sdk-java-backlog#110.

As an orchestration user, I want to have a convenient way of accessing the LLM result and further related information.

Feature scope:

  • Added OrchestrationResponse that wraps CompletionPostResponse.

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Aligned changes with the JavaScript SDK
  • Documentation updated
  • Release notes updated

@Jonas-Isr Jonas-Isr added the please-review Request to review a pull-request label Nov 13, 2024
Copy link
Member

@MatKuhr MatKuhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the other aspects like token usage?

Otherwise lgtm. While I would prefer a bit stronger separation to our generated code, I can't think of a specific scenario where the inheritance will break sonerhing. The main downside of the inheritance IMO is that the most used convenience methods get buried among the generated getters and setters. But currently there are not too many of those on the root response object, so should be fine

pom.xml Outdated Show resolved Hide resolved
Jonas Israel added 2 commits November 14, 2024 14:31
# Conflicts:
#	orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationClient.java
#	orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java
#	pom.xml
#	sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OrchestrationController.java
#	sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/OrchestrationTest.java
@Jonas-Isr Jonas-Isr requested review from MatKuhr and newtork November 14, 2024 14:05
Jonas Israel and others added 3 commits November 18, 2024 14:16
# Conflicts:
#	orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java
MatKuhr
MatKuhr previously approved these changes Nov 18, 2024
Copy link
Member

@MatKuhr MatKuhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

@MatKuhr MatKuhr merged commit 173530d into main Nov 18, 2024
5 checks passed
@MatKuhr MatKuhr deleted the Response-Convenience#110 branch November 18, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please-review Request to review a pull-request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants