Skip to main content

Crate bankr_agent_api

Crate bankr_agent_api 

Source
Expand description

§bankr-agent-api

Rust client library for the Bankr Agent API.

§Quick start

use bankr_agent_api::{BankrAgentClient, types::PromptRequest};

let client = BankrAgentClient::new("your_api_key")?;

// Get user profile
let me = client.get_me().await?;
println!("Wallets: {:?}", me.wallets);

// Submit a prompt and wait for the result
let req = PromptRequest { prompt: "what is the price of ETH?".to_owned(), thread_id: None };
let job = client.prompt_and_wait(&req).await?;
println!("Response: {:?}", job.response);

Re-exports§

pub use client::BankrAgentClient;

Modules§

client
Bankr Agent API client built on hpx-transport.
error
Error types for the bankr-agent-api crate.
types
Request and response types for the Bankr Agent API.