Skip to main content

Crate vectoramp

Crate vectoramp 

Source
Expand description

Official Rust client for the VectorAmp public API.

Default API base URL: https://api.vectoramp.com. Authentication uses the X-API-Key header. The default transport is JSON over HTTPS with a small Transport trait so other transports (gRPC, mocks) can be plugged in.

Public dataset creation always uses the SABLE index type; the SDK does not expose an index-type option.

§Quick start

use vectoramp::Client;

let client = Client::new(std::env::var("VECTORAMP_API_KEY").unwrap());

// Only a name is required: embedding defaults to VectorAmp-Embedding-4B,
// dim is inferred (2560), metric defaults to cosine, index is SABLE.
let dataset = client.datasets().create("product-docs").await?;

dataset.add_texts(vec!["VectorAmp is a high-performance vector database."]).await?;

let answer = dataset.ask("What is VectorAmp?").await?;
println!("{}", answer.answer);

Re-exports§

pub use client::Client;
pub use client::ClientBuilder;
pub use datasets::AddTextsOptions;
pub use datasets::Dataset;
pub use datasets::DatasetService;
pub use datasets::Pagination;
pub use datasets::SearchInput;
pub use datasets::SearchOptions;
pub use datasets::DEFAULT_PAGE_LIMIT;
pub use datasets::DEFAULT_SEARCH_TOP_K;
pub use errors::ApiError;
pub use errors::Error;
pub use errors::Result;
pub use ingestion::DocumentListOptions;
pub use ingestion::IngestFilesOptions;
pub use ingestion::IngestionService;
pub use intelligence::AskOptions;
pub use intelligence::AskStream;
pub use intelligence::IntelligenceService;
pub use intelligence::StreamEvent;
pub use schedules::ScheduleService;
pub use secrets::OrgSecretService;
pub use secrets::OPENAI_API_KEY_SECRET_REF;
pub use sources::ConfluenceSource;
pub use sources::FileUploadSource;
pub use sources::GcsSource;
pub use sources::GenericSource;
pub use sources::GitHubSource;
pub use sources::GitLabSource;
pub use sources::GoogleDriveSource;
pub use sources::IntoCreateSourceRequest;
pub use sources::JiraSource;
pub use sources::S3Source;
pub use sources::WebSelectors;
pub use sources::WebSource;
pub use transport::Request;
pub use transport::Response;
pub use transport::Transport;
pub use types::*;

Modules§

client
Top-level Client and ClientBuilder.
datasets
Dataset service and the Dataset resource handle.
errors
Error types returned by the SDK.
ingestion
Ingestion service: sources, jobs, and the high-level file-upload flow.
intelligence
Intelligence service: non-streaming and streaming RAG queries.
schedules
Recurring ingestion schedules.
secrets
Organization-scoped provider secret helpers.
sources
Typed builders for ingestion sources.
transport
Transport layer used by Client.
types
Core data types returned by and sent to the VectorAmp API.

Constants§

DEFAULT_BASE_URL
Default VectorAmp API base URL used when none is supplied to the builder.
USER_AGENT
User-agent string sent with every request.