-
Notifications
You must be signed in to change notification settings - Fork 15
test: [Orchestration] Extend Grounding Unit Test #281
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
Conversation
MatKuhr
left a comment
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.
otherwise lgtm
orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java
Show resolved
Hide resolved
orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java
Outdated
Show resolved
Hide resolved
| final var groundingConfigConfig = | ||
| GroundingModuleConfigConfig.create() | ||
| .inputParams(List.of("query")) | ||
| .outputParam("results") | ||
| .addFiltersItem(databaseFilter); | ||
| final var groundingConfig = | ||
| GroundingModuleConfig.create() | ||
| .type(GroundingModuleConfig.TypeEnum.DOCUMENT_GROUNDING_SERVICE) | ||
| .config(groundingConfigConfig); | ||
| final var configWithGrounding = config.withGroundingConfig(groundingConfig); | ||
|
|
||
| final Map<String, String> inputParams = | ||
| Map.of("query", "String used for similarity search in database"); | ||
| final var prompt = | ||
| new OrchestrationPrompt( | ||
| inputParams, | ||
| Message.system("Context message with embedded grounding results. {{?results}}")); | ||
|
|
||
| final var response = client.chatCompletion(prompt, configWithGrounding); |
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.
(Question)
This is supposed to be the expected convenience API usage, right?
Looks tough.
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.
no, this is generated code only.
Context
AI/ai-sdk-java-backlog#144.
Extend the unit test for covering the request serialisation as well.
Feature scope:
Definition of Done
Error handling created / updated & covered by the tests aboveAligned changes with the JavaScript SDKDocumentation updatedRelease notes updated