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
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 144
configured_endpoints: 150
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/ai.llamaindex.llamacloud/llama-cloud)](https://central.sonatype.com/artifact/ai.llamaindex.llamacloud/llama-cloud/1.8.0)
[![javadoc](https://javadoc.io/badge2/ai.llamaindex.llamacloud/llama-cloud/1.8.0/javadoc.svg)](https://javadoc.io/doc/ai.llamaindex.llamacloud/llama-cloud/1.7.0)
[![javadoc](https://javadoc.io/badge2/ai.llamaindex.llamacloud/llama-cloud/1.8.0/javadoc.svg)](https://javadoc.io/doc/ai.llamaindex.llamacloud/llama-cloud/1.8.0)

<!-- x-release-please-end -->

Expand Down Expand Up @@ -271,13 +271,13 @@ To access this data, prefix any HTTP method call on a client or service with `wi
```java
import ai.llamaindex.llamacloud.core.http.Headers;
import ai.llamaindex.llamacloud.core.http.HttpResponseFor;
import ai.llamaindex.llamacloud.models.beta.indexes.IndexListPage;
import ai.llamaindex.llamacloud.models.beta.indexes.IndexListParams;
import ai.llamaindex.llamacloud.models.indexes.IndexListPage;
import ai.llamaindex.llamacloud.models.indexes.IndexListParams;

IndexListParams params = IndexListParams.builder()
.projectId("my-project-id")
.build();
HttpResponseFor<IndexListPage> page = client.beta().indexes().withRawResponse().list(params);
HttpResponseFor<IndexListPage> page = client.indexes().withRawResponse().list(params);

int statusCode = page.statusCode();
Headers headers = page.headers();
Expand All @@ -286,7 +286,7 @@ Headers headers = page.headers();
You can still deserialize the response into an instance of a Java class if needed:

```java
import ai.llamaindex.llamacloud.models.beta.indexes.IndexListPage;
import ai.llamaindex.llamacloud.models.indexes.IndexListPage;

IndexListPage parsedPage = page.parse();
```
Expand Down Expand Up @@ -497,9 +497,9 @@ Requests time out after 1 minute by default.
To set a custom timeout, configure the method call using the `timeout` method:

```java
import ai.llamaindex.llamacloud.models.beta.indexes.IndexListPage;
import ai.llamaindex.llamacloud.models.indexes.IndexListPage;

IndexListPage page = client.beta().indexes().list(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build());
IndexListPage page = client.indexes().list(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build());
```

Or configure the default for all method calls at the client level:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
package ai.llamaindex.llamacloud.client

import ai.llamaindex.llamacloud.core.ClientOptions
import ai.llamaindex.llamacloud.services.blocking.AlphaService
import ai.llamaindex.llamacloud.services.blocking.BatchService
import ai.llamaindex.llamacloud.services.blocking.BetaService
import ai.llamaindex.llamacloud.services.blocking.ChatService
import ai.llamaindex.llamacloud.services.blocking.ClassifierService
import ai.llamaindex.llamacloud.services.blocking.ClassifyService
import ai.llamaindex.llamacloud.services.blocking.ConfigurationService
Expand All @@ -13,9 +15,11 @@ import ai.llamaindex.llamacloud.services.blocking.DataSourceService
import ai.llamaindex.llamacloud.services.blocking.ExtractService
import ai.llamaindex.llamacloud.services.blocking.ExtractionAgentService
import ai.llamaindex.llamacloud.services.blocking.FileService
import ai.llamaindex.llamacloud.services.blocking.IndexService
import ai.llamaindex.llamacloud.services.blocking.ParsingService
import ai.llamaindex.llamacloud.services.blocking.PipelineService
import ai.llamaindex.llamacloud.services.blocking.ProjectService
import ai.llamaindex.llamacloud.services.blocking.RetrievalService
import ai.llamaindex.llamacloud.services.blocking.RetrieverService
import ai.llamaindex.llamacloud.services.blocking.SplitService
import ai.llamaindex.llamacloud.services.blocking.V2ProjectService
Expand Down Expand Up @@ -90,8 +94,16 @@ interface LlamaCloudClient {

fun retrievers(): RetrieverService

fun indexes(): IndexService

fun retrieval(): RetrievalService

fun chat(): ChatService

fun beta(): BetaService

fun alpha(): AlphaService

/**
* Closes this client, relinquishing any underlying resources.
*
Expand Down Expand Up @@ -147,6 +159,14 @@ interface LlamaCloudClient {

fun retrievers(): RetrieverService.WithRawResponse

fun indexes(): IndexService.WithRawResponse

fun retrieval(): RetrievalService.WithRawResponse

fun chat(): ChatService.WithRawResponse

fun beta(): BetaService.WithRawResponse

fun alpha(): AlphaService.WithRawResponse
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
package ai.llamaindex.llamacloud.client

import ai.llamaindex.llamacloud.core.ClientOptions
import ai.llamaindex.llamacloud.services.async.AlphaServiceAsync
import ai.llamaindex.llamacloud.services.async.BatchServiceAsync
import ai.llamaindex.llamacloud.services.async.BetaServiceAsync
import ai.llamaindex.llamacloud.services.async.ChatServiceAsync
import ai.llamaindex.llamacloud.services.async.ClassifierServiceAsync
import ai.llamaindex.llamacloud.services.async.ClassifyServiceAsync
import ai.llamaindex.llamacloud.services.async.ConfigurationServiceAsync
Expand All @@ -13,9 +15,11 @@ import ai.llamaindex.llamacloud.services.async.DataSourceServiceAsync
import ai.llamaindex.llamacloud.services.async.ExtractServiceAsync
import ai.llamaindex.llamacloud.services.async.ExtractionAgentServiceAsync
import ai.llamaindex.llamacloud.services.async.FileServiceAsync
import ai.llamaindex.llamacloud.services.async.IndexServiceAsync
import ai.llamaindex.llamacloud.services.async.ParsingServiceAsync
import ai.llamaindex.llamacloud.services.async.PipelineServiceAsync
import ai.llamaindex.llamacloud.services.async.ProjectServiceAsync
import ai.llamaindex.llamacloud.services.async.RetrievalServiceAsync
import ai.llamaindex.llamacloud.services.async.RetrieverServiceAsync
import ai.llamaindex.llamacloud.services.async.SplitServiceAsync
import ai.llamaindex.llamacloud.services.async.V2ProjectServiceAsync
Expand Down Expand Up @@ -90,8 +94,16 @@ interface LlamaCloudClientAsync {

fun retrievers(): RetrieverServiceAsync

fun indexes(): IndexServiceAsync

fun retrieval(): RetrievalServiceAsync

fun chat(): ChatServiceAsync

fun beta(): BetaServiceAsync

fun alpha(): AlphaServiceAsync

/**
* Closes this client, relinquishing any underlying resources.
*
Expand Down Expand Up @@ -151,6 +163,14 @@ interface LlamaCloudClientAsync {

fun retrievers(): RetrieverServiceAsync.WithRawResponse

fun indexes(): IndexServiceAsync.WithRawResponse

fun retrieval(): RetrievalServiceAsync.WithRawResponse

fun chat(): ChatServiceAsync.WithRawResponse

fun beta(): BetaServiceAsync.WithRawResponse

fun alpha(): AlphaServiceAsync.WithRawResponse
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ package ai.llamaindex.llamacloud.client

import ai.llamaindex.llamacloud.core.ClientOptions
import ai.llamaindex.llamacloud.core.getPackageVersion
import ai.llamaindex.llamacloud.services.async.AlphaServiceAsync
import ai.llamaindex.llamacloud.services.async.AlphaServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.BatchServiceAsync
import ai.llamaindex.llamacloud.services.async.BatchServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.BetaServiceAsync
import ai.llamaindex.llamacloud.services.async.BetaServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.ChatServiceAsync
import ai.llamaindex.llamacloud.services.async.ChatServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.ClassifierServiceAsync
import ai.llamaindex.llamacloud.services.async.ClassifierServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.ClassifyServiceAsync
Expand All @@ -24,12 +28,16 @@ import ai.llamaindex.llamacloud.services.async.ExtractionAgentServiceAsync
import ai.llamaindex.llamacloud.services.async.ExtractionAgentServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.FileServiceAsync
import ai.llamaindex.llamacloud.services.async.FileServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.IndexServiceAsync
import ai.llamaindex.llamacloud.services.async.IndexServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.ParsingServiceAsync
import ai.llamaindex.llamacloud.services.async.ParsingServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.PipelineServiceAsync
import ai.llamaindex.llamacloud.services.async.PipelineServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.ProjectServiceAsync
import ai.llamaindex.llamacloud.services.async.ProjectServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.RetrievalServiceAsync
import ai.llamaindex.llamacloud.services.async.RetrievalServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.RetrieverServiceAsync
import ai.llamaindex.llamacloud.services.async.RetrieverServiceAsyncImpl
import ai.llamaindex.llamacloud.services.async.SplitServiceAsync
Expand Down Expand Up @@ -119,8 +127,22 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
RetrieverServiceAsyncImpl(clientOptionsWithUserAgent)
}

private val indexes: IndexServiceAsync by lazy {
IndexServiceAsyncImpl(clientOptionsWithUserAgent)
}

private val retrieval: RetrievalServiceAsync by lazy {
RetrievalServiceAsyncImpl(clientOptionsWithUserAgent)
}

private val chat: ChatServiceAsync by lazy { ChatServiceAsyncImpl(clientOptionsWithUserAgent) }

private val beta: BetaServiceAsync by lazy { BetaServiceAsyncImpl(clientOptionsWithUserAgent) }

private val alpha: AlphaServiceAsync by lazy {
AlphaServiceAsyncImpl(clientOptionsWithUserAgent)
}

override fun sync(): LlamaCloudClient = sync

override fun withRawResponse(): LlamaCloudClientAsync.WithRawResponse = withRawResponse
Expand Down Expand Up @@ -160,8 +182,16 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam

override fun retrievers(): RetrieverServiceAsync = retrievers

override fun indexes(): IndexServiceAsync = indexes

override fun retrieval(): RetrievalServiceAsync = retrieval

override fun chat(): ChatServiceAsync = chat

override fun beta(): BetaServiceAsync = beta

override fun alpha(): AlphaServiceAsync = alpha

override fun close() = clientOptions.close()

class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
Expand Down Expand Up @@ -231,10 +261,26 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam
RetrieverServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}

private val indexes: IndexServiceAsync.WithRawResponse by lazy {
IndexServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}

private val retrieval: RetrievalServiceAsync.WithRawResponse by lazy {
RetrievalServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}

private val chat: ChatServiceAsync.WithRawResponse by lazy {
ChatServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}

private val beta: BetaServiceAsync.WithRawResponse by lazy {
BetaServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}

private val alpha: AlphaServiceAsync.WithRawResponse by lazy {
AlphaServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}

override fun withOptions(
modifier: Consumer<ClientOptions.Builder>
): LlamaCloudClientAsync.WithRawResponse =
Expand Down Expand Up @@ -275,6 +321,14 @@ class LlamaCloudClientAsyncImpl(private val clientOptions: ClientOptions) : Llam

override fun retrievers(): RetrieverServiceAsync.WithRawResponse = retrievers

override fun indexes(): IndexServiceAsync.WithRawResponse = indexes

override fun retrieval(): RetrievalServiceAsync.WithRawResponse = retrieval

override fun chat(): ChatServiceAsync.WithRawResponse = chat

override fun beta(): BetaServiceAsync.WithRawResponse = beta

override fun alpha(): AlphaServiceAsync.WithRawResponse = alpha
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ package ai.llamaindex.llamacloud.client

import ai.llamaindex.llamacloud.core.ClientOptions
import ai.llamaindex.llamacloud.core.getPackageVersion
import ai.llamaindex.llamacloud.services.blocking.AlphaService
import ai.llamaindex.llamacloud.services.blocking.AlphaServiceImpl
import ai.llamaindex.llamacloud.services.blocking.BatchService
import ai.llamaindex.llamacloud.services.blocking.BatchServiceImpl
import ai.llamaindex.llamacloud.services.blocking.BetaService
import ai.llamaindex.llamacloud.services.blocking.BetaServiceImpl
import ai.llamaindex.llamacloud.services.blocking.ChatService
import ai.llamaindex.llamacloud.services.blocking.ChatServiceImpl
import ai.llamaindex.llamacloud.services.blocking.ClassifierService
import ai.llamaindex.llamacloud.services.blocking.ClassifierServiceImpl
import ai.llamaindex.llamacloud.services.blocking.ClassifyService
Expand All @@ -24,12 +28,16 @@ import ai.llamaindex.llamacloud.services.blocking.ExtractionAgentService
import ai.llamaindex.llamacloud.services.blocking.ExtractionAgentServiceImpl
import ai.llamaindex.llamacloud.services.blocking.FileService
import ai.llamaindex.llamacloud.services.blocking.FileServiceImpl
import ai.llamaindex.llamacloud.services.blocking.IndexService
import ai.llamaindex.llamacloud.services.blocking.IndexServiceImpl
import ai.llamaindex.llamacloud.services.blocking.ParsingService
import ai.llamaindex.llamacloud.services.blocking.ParsingServiceImpl
import ai.llamaindex.llamacloud.services.blocking.PipelineService
import ai.llamaindex.llamacloud.services.blocking.PipelineServiceImpl
import ai.llamaindex.llamacloud.services.blocking.ProjectService
import ai.llamaindex.llamacloud.services.blocking.ProjectServiceImpl
import ai.llamaindex.llamacloud.services.blocking.RetrievalService
import ai.llamaindex.llamacloud.services.blocking.RetrievalServiceImpl
import ai.llamaindex.llamacloud.services.blocking.RetrieverService
import ai.llamaindex.llamacloud.services.blocking.RetrieverServiceImpl
import ai.llamaindex.llamacloud.services.blocking.SplitService
Expand Down Expand Up @@ -109,8 +117,18 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
RetrieverServiceImpl(clientOptionsWithUserAgent)
}

private val indexes: IndexService by lazy { IndexServiceImpl(clientOptionsWithUserAgent) }

private val retrieval: RetrievalService by lazy {
RetrievalServiceImpl(clientOptionsWithUserAgent)
}

private val chat: ChatService by lazy { ChatServiceImpl(clientOptionsWithUserAgent) }

private val beta: BetaService by lazy { BetaServiceImpl(clientOptionsWithUserAgent) }

private val alpha: AlphaService by lazy { AlphaServiceImpl(clientOptionsWithUserAgent) }

override fun async(): LlamaCloudClientAsync = async

override fun withRawResponse(): LlamaCloudClient.WithRawResponse = withRawResponse
Expand Down Expand Up @@ -150,8 +168,16 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou

override fun retrievers(): RetrieverService = retrievers

override fun indexes(): IndexService = indexes

override fun retrieval(): RetrievalService = retrieval

override fun chat(): ChatService = chat

override fun beta(): BetaService = beta

override fun alpha(): AlphaService = alpha

override fun close() = clientOptions.close()

class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
Expand Down Expand Up @@ -221,10 +247,26 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou
RetrieverServiceImpl.WithRawResponseImpl(clientOptions)
}

private val indexes: IndexService.WithRawResponse by lazy {
IndexServiceImpl.WithRawResponseImpl(clientOptions)
}

private val retrieval: RetrievalService.WithRawResponse by lazy {
RetrievalServiceImpl.WithRawResponseImpl(clientOptions)
}

private val chat: ChatService.WithRawResponse by lazy {
ChatServiceImpl.WithRawResponseImpl(clientOptions)
}

private val beta: BetaService.WithRawResponse by lazy {
BetaServiceImpl.WithRawResponseImpl(clientOptions)
}

private val alpha: AlphaService.WithRawResponse by lazy {
AlphaServiceImpl.WithRawResponseImpl(clientOptions)
}

override fun withOptions(
modifier: Consumer<ClientOptions.Builder>
): LlamaCloudClient.WithRawResponse =
Expand Down Expand Up @@ -264,6 +306,14 @@ class LlamaCloudClientImpl(private val clientOptions: ClientOptions) : LlamaClou

override fun retrievers(): RetrieverService.WithRawResponse = retrievers

override fun indexes(): IndexService.WithRawResponse = indexes

override fun retrieval(): RetrievalService.WithRawResponse = retrieval

override fun chat(): ChatService.WithRawResponse = chat

override fun beta(): BetaService.WithRawResponse = beta

override fun alpha(): AlphaService.WithRawResponse = alpha
}
}
Loading
Loading