-
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
Cloud SDK generator with oneOf fix #186
Changes from 14 commits
eead3fc
31fc1cf
298b936
d9affb4
f7077b3
05f3d74
7587e8e
9e0872d
daf7727
20432d1
90bf752
5348549
a26734f
dc38336
2884720
2be6e81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,12 +168,10 @@ public OrchestrationChatResponse executeRequestFromJsonModuleConfig( | |
"Prompt must not contain any messages when using a JSON module configuration, as the template is already defined in the JSON."); | ||
} | ||
|
||
final var request = | ||
new CompletionPostRequest() | ||
.messagesHistory(prompt.getMessagesHistory()) | ||
.inputParams(prompt.getTemplateParameters()); | ||
final ObjectNode requestJson = JACKSON.createObjectNode(); | ||
requestJson.set("messages_history", JACKSON.valueToTree(prompt.getMessagesHistory())); | ||
requestJson.set("input_params", JACKSON.valueToTree(prompt.getTemplateParameters())); | ||
Comment on lines
+171
to
+173
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Question/Minor) Why not use Your change requires the developer to know the keys are called "messages_history" and "input_params". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because Matthias built an invalid object that our builder doesn't allow anymore. Plus the developer still has to know the key There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The object itself isn't invalid, it's just not built all in one line of code 😉 We could still use |
||
|
||
final ObjectNode requestJson = JACKSON.valueToTree(request); | ||
final JsonNode moduleConfigJson; | ||
try { | ||
moduleConfigJson = JACKSON.readTree(moduleConfig); | ||
|
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.
useOneOfInterfaces
is the only addition compared to the old Cloud SDK generator