Package ai.vectros.resources.inference
Class RawInferenceClient
java.lang.Object
ai.vectros.resources.inference.RawInferenceClient
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchatInference(ChatRequest request) Streams a model response as Server-Sent Events (SSE).chatInference(ChatRequest request, RequestOptions requestOptions) Streams a model response as Server-Sent Events (SSE).documentAsk(String id, DocumentAskRequest request) Loads a single document's extracted text, supplies it as context, and streams a model answer about it.documentAsk(String id, DocumentAskRequest request, RequestOptions requestOptions) Loads a single document's extracted text, supplies it as context, and streams a model answer about it.Returns every inference model available to you, including each model's context window, the plan tiers it's available on, and the exact credit rates charged per 1K input and output tokens.listInferenceModels(RequestOptions requestOptions) Returns every inference model available to you, including each model's context window, the plan tiers it's available on, and the exact credit rates charged per 1K input and output tokens.ragInference(RagRequest request) Runs hybrid search over your indexed content, then streams a model answer grounded in the top results.ragInference(RagRequest request, RequestOptions requestOptions) Runs hybrid search over your indexed content, then streams a model answer grounded in the top results.
-
Field Details
-
clientOptions
-
-
Constructor Details
-
RawInferenceClient
-
-
Method Details
-
listInferenceModels
Returns every inference model available to you, including each model's context window, the plan tiers it's available on, and the exact credit rates charged per 1K input and output tokens. Use this to populate model pickers and to validate a request before calling/v1/chat,/v1/rag, or/v1/documents/{id}/ask. -
listInferenceModels
Returns every inference model available to you, including each model's context window, the plan tiers it's available on, and the exact credit rates charged per 1K input and output tokens. Use this to populate model pickers and to validate a request before calling/v1/chat,/v1/rag, or/v1/documents/{id}/ask. -
chatInference
Streams a model response as Server-Sent Events (SSE). Send the full conversation history in themessagesarray; a message with rolesystemis extracted and used as the system prompt. Token cost is debited from your pre-paid inference balance (in cents), and a small per-call flat fee is debited from your monthly platform credit allowance. Requires theinference:rscope. -
chatInference
public VectrosApiHttpResponse<Iterable<ChatStreamEvent>> chatInference(ChatRequest request, RequestOptions requestOptions) Streams a model response as Server-Sent Events (SSE). Send the full conversation history in themessagesarray; a message with rolesystemis extracted and used as the system prompt. Token cost is debited from your pre-paid inference balance (in cents), and a small per-call flat fee is debited from your monthly platform credit allowance. Requires theinference:rscope. -
documentAsk
public VectrosApiHttpResponse<Iterable<DocumentAskStreamEvent>> documentAsk(String id, DocumentAskRequest request) Loads a single document's extracted text, supplies it as context, and streams a model answer about it. The document must be fully indexed. If the document exceeds the 32K-token cap, the call returns 413 with no credits charged — usePOST /v1/raginstead to answer over larger or multi-document collections. Requires theinference:rscope. -
documentAsk
public VectrosApiHttpResponse<Iterable<DocumentAskStreamEvent>> documentAsk(String id, DocumentAskRequest request, RequestOptions requestOptions) Loads a single document's extracted text, supplies it as context, and streams a model answer about it. The document must be fully indexed. If the document exceeds the 32K-token cap, the call returns 413 with no credits charged — usePOST /v1/raginstead to answer over larger or multi-document collections. Requires theinference:rscope. -
ragInference
Runs hybrid search over your indexed content, then streams a model answer grounded in the top results. The SSE stream emits asearch_resultsevent first (carrying the matched results and their metadata), an optionaltruncation_warningif some retrieved results were dropped before the prompt was built — either because they didn't fit the model's context window or because a result had no groundable text to include — thencontent_deltachunks, and finally a terminaldoneevent. Requires theinference:rscope. -
ragInference
public VectrosApiHttpResponse<Iterable<RagStreamEvent>> ragInference(RagRequest request, RequestOptions requestOptions) Runs hybrid search over your indexed content, then streams a model answer grounded in the top results. The SSE stream emits asearch_resultsevent first (carrying the matched results and their metadata), an optionaltruncation_warningif some retrieved results were dropped before the prompt was built — either because they didn't fit the model's context window or because a result had no groundable text to include — thencontent_deltachunks, and finally a terminaldoneevent. Requires theinference:rscope.
-