Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions docs/release_notes/v0.8.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Spice Java SDK v0.8.0

## What's New

### 🔎 Search

`search()` finds documents similar to a piece of text via the runtime's `/v1/search` endpoint (vector, keyword, and hybrid search), for datasets with an embedding column and a loaded embedding model.

```java
SearchResponse response = client.search(
new SearchRequest("delayed flights to Seattle")
.withDatasets(List.of("flight_reviews"))
.withLimit(5));

for (SearchMatch match : response.getResults()) {
System.out.println(match.getDataset() + ": " + match.getScore());
}
```

### 🗣️ Natural Language to SQL (Nsql)

`nsql()` translates a natural-language query into SQL via the runtime's configured LLM and runs it, returning the rows alongside the generated SQL. `nsqlGenerateSql()` generates the SQL without running it — inspect or edit it, or run it through `query()`/`queryWithParams()` for Arrow-typed results instead of `nsql()`'s decoded JSON rows.

```java
NsqlResponse response = client.nsql(new NsqlRequest("how many trips were over 10 miles?"));
System.out.println(response.getSql());
System.out.println(response.getData());

String sql = client.nsqlGenerateSql(new NsqlRequest("how many trips were over 10 miles?"));
```

## Compatibility

- Public API unchanged: both features are new methods; nothing existing was renamed, removed, or retyped.
- No new dependencies.

4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>ai.spice</groupId>
<artifactId>spiceai</artifactId>
<packaging>jar</packaging>
<version>0.7.0</version>
<version>0.8.0</version>
Comment thread
krinart marked this conversation as resolved.
<name>Java Spice SDK</name>
<url>https://github.com/spiceai/spice-java/</url>
<description>Spice provides a unified SQL query interface and portable runtime to locally materialize, accelerate, and query datasets from any database, data warehouse, or data lake.</description>
Expand Down Expand Up @@ -46,7 +46,7 @@
<!-- The last published release, which the japicmp API-compatibility
gate compares against. Bump when releasing; the publish workflow
fails if this still equals the version being released. -->
<japicmp.oldVersion>0.6.0</japicmp.oldVersion>
<japicmp.oldVersion>0.7.0</japicmp.oldVersion>
Comment thread
krinart marked this conversation as resolved.
</properties>
<dependencyManagement>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/spice/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public class Version {
public static final String SPICE_JAVA_VERSION;

static {
SPICE_JAVA_VERSION = "0.7.0";
SPICE_JAVA_VERSION = "0.8.0";
}
}
Loading