-
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: Improve Orchestration Sample Code #141
Conversation
.filter(entity -> entity != DPIEntities.UNKNOWN_DEFAULT_OPEN_API) | ||
.map(entity -> DPIEntityConfig.create().type(entity)) | ||
.toList(); | ||
private static CompletionPostRequest prepareRequest( |
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.
helper methods are more typical and easier to understand
}; | ||
@GetMapping("/completion") | ||
@Nonnull | ||
public CompletionPostResponse completion() { |
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.
Added a simple completion, since templating is optional (and potentially easier to do in other places of the code).
ChatMessage.create() | ||
.role("system") | ||
.content( | ||
"Please evaluate the following user feedback and judge if the sentiment is positive or negative."); |
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.
IMO the CV was a bit too long and doesn't make the difference between anon / pseudo clear, thus the switch to this use case.
…leanup' into chore/sample-code-cleanup
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.
My review is #143, it was too big
* Charles review of orchestration sample code * More fixes
Context
This PR updates the orchestration sample code to be more realistic and more concise.
Also, the E2E test assertions are improved to assert on expected output.
Definition of Done
Error handling created / updated & covered by the tests aboveAligned changes with the JavaScript SDKDocumentation updatedRelease notes updated