-
Notifications
You must be signed in to change notification settings - Fork 3
chore: Explicit no-convenience; Add code usage examples #340
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
base: main
Are you sure you want to change the base?
Conversation
Clarified the warning about model and client classes generated from OpenAPI specifications, emphasizing stability and maintenance.
Clarified stability and maintenance of generated classes.
Added examples for document creation and search using the Vector API.
Added examples for collection and document creation using the Vector API.
| .key("animal").value("dog"))) | ||
| .metadata(DocumentKeyValueListPair.create() | ||
| .key("topic").value("sound"))); | ||
| DocumentsListResponse response = api.createDocuments(resourceGroupId, collectionId, request); |
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.
Document creation is not compiling
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.
var request =
DocumentCreateRequest.create()
.documents(
BaseDocument.create()
.chunks(
TextOnlyBaseChunk.create()
.content("The dog makes _woof_")
.metadata(VectorKeyValueListPair.create().key("animal").value("dog")))
.metadata(VectorDocumentKeyValueListPair.create().key("topic").value("sound")));| Collection creation: | ||
|
|
||
| ``` |
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.
| Collection creation: | |
| ``` | |
| #### Collection creation: | |
| ```java |
| String collectionId = locationHeader.replaceAll("^.*?/([a-f0-9-]+)/.*?$", "$1"); | ||
| ``` | ||
|
|
||
| Document creation: |
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.
| Document creation: | |
| #### Document creation: |
| DocumentsListResponse response = api.createDocuments(resourceGroupId, collectionId, request); | ||
| ``` | ||
|
|
||
| Document search: |
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.
| Document search: | |
| #### Document search: |
What Has Changed?
See
SAP/ai-sdk-java#673
SAP/ai-sdk-java#672
SAP/ai-sdk-java#678