Skip to content

Commit fb04228

Browse files
authored
Merge branch 'main' into chore/remove-obsolete-jackson-mixins
2 parents 3289a4d + 3e596de commit fb04228

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

docs/guides/OPENAI_CHAT_COMPLETION.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,15 @@ System.out.println("Tokens used: " + tokensUsed);
200200

201201
Please find [an example in our Spring Boot application](../../sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OpenAiController.java). It shows the usage of Spring
202202
Boot's `ResponseBodyEmitter` to stream the chat completion delta messages to the frontend in real-time.
203+
204+
### Embedding
205+
206+
Get the embeddings of a text input in list of float values:
207+
208+
```java
209+
OpenAiEmbeddingParameters request = new OpenAiEmbeddingParameters().setInput("Hello World");
210+
211+
OpenAiEmbeddingOutput embedding = OpenAiClient.forModel(TEXT_EMBEDDING_ADA_002).embedding(request);
212+
```
213+
214+
See [an example in our Spring Boot application](../../sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OpenAiController.java)

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
<dependency>
113113
<groupId>com.fasterxml.jackson.module</groupId>
114114
<artifactId>jackson-module-parameter-names</artifactId>
115-
<version>2.18.1</version>
115+
<version>2.18.2</version>
116116
</dependency>
117117
<!-- scope "test" -->
118118
<dependency>
@@ -589,7 +589,7 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
589589
<plugin>
590590
<groupId>org.owasp</groupId>
591591
<artifactId>dependency-check-maven</artifactId>
592-
<version>11.1.0</version>
592+
<version>11.1.1</version>
593593
<configuration>
594594
<connectionTimeout>60000</connectionTimeout>
595595
<nvdMaxRetryCount>20</nvdMaxRetryCount>
@@ -714,7 +714,7 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
714714
<plugin>
715715
<groupId>org.apache.maven.plugins</groupId>
716716
<artifactId>maven-javadoc-plugin</artifactId>
717-
<version>3.11.1</version>
717+
<version>3.11.2</version>
718718
<configuration>
719719
<quiet>true</quiet>
720720
<additionalOptions>-Xdoclint:none</additionalOptions>

0 commit comments

Comments
 (0)