{"repo":"mochi-neko/clust","free":true,"listed":false,"github":"https://github.com/mochi-neko/clust","clone":"git clone https://github.com/mochi-neko/clust.git","description":"An unofficial Rust client for the Anthropic/Claude API.","language":"Rust","stars":42,"topics":["api-client","claude-3","rust"],"license":"Apache-2.0","category":"api-integrations-sdks","readme_excerpt":"clust An unofficial Rust client for the Anthropic/Claude API. Installation Run the following Cargo command in your project directory: or add the following line to your Cargo.toml: Supported APIs - Messages - [x] Create a Message - [x] Streaming Messages Feature flags - macros : Enable the clust::attributse::clust tool attribute macro for generating clust::messages::Tool or clust::messages::AsyncTool from a Rust function. Usages API key and client First you need to create a new API client: clust::Client with your Anthropic API key from environment variable: ANTHROPIC API KEY . or specify the API key directly: If you want to customize the client, you can use builder pattern by clust::ClientBuilder : Models and max tokens You can specify the model by clust::messages::ClaudeModel . Because max number of tokens of text generation: clust::messages::MaxTokens depends on the model, you need to create clust::messages::MaxTokens with the model. Prompt You can specify the system prompt by clust::messages::SystemPrompt and there is no \"system\" role in the message. Messages and contents Build messages by a vector of clust::messages::Message : You can create each role message as follows: and a content: clust::messages::Content . Multiple blocks is a vector of content block: clust::messages::ContentBlock : You can create a content as follows: Request body The request body is defined by clust::messages::MessagesRequestBody . See also MessagesRequestBody for other options. You can also use th","default_branch":null,"files":null,"tree":[],"storefront":"/r/mochi-neko","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mochi-neko/clust/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}