diff --git a/README.md b/README.md index 8745bda..87273d7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,24 @@ # Anthropic Rust SDK +[![Crates.io][crates-badge]][crates-url] +[![MIT licensed][mit-badge]][mit-url] +[![APACHE-2.0 licensed][apache-badge]][apache-url] +[![Build Status][actions-badge]][actions-url] + +[crates-badge]: https://img.shields.io/crates/v/anthropic-rs.svg +[crates-url]: https://crates.io/crates/anthropic-rs +[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg +[mit-url]: https://github.com/roushou/anthropic-rs/blob/master/LICENSE-MIT +[apache-badge]: https://img.shields.io/badge/license-apache-blue.svg +[apache-url]: https://github.com/roushou/anthropic-rs/blob/master/LICENSE-APACHE +[actions-badge]: https://github.com/roushou/anthropic-rs/workflows/CI/badge.svg +[actions-url]: https://github.com/roushou/anthropic-rs/actions?query=workflow%3ACI+branch%3Amaster + This is an unofficial Rust SDK for the Anthropic API. -## Basic usage +## Usage + +A basic example to stream messages. ```rs use anthropic_rs::{ @@ -27,7 +43,7 @@ async fn main() { role: Role::User, content: vec![Content { content_type: ContentType::Text, - text: "Hello World".to_string(), + text: "Explain the theory of relativity".to_string(), }], }], ..Default::default() @@ -37,3 +53,7 @@ async fn main() { println!("{:?}", result); } ``` + +## License + +This project is licensed under the [MIT license](./LICENSE-MIT) and [Apache-2.0](./LICENSE-APACHE) license. diff --git a/anthropic/README.md b/anthropic/README.md index 8745bda..87273d7 100644 --- a/anthropic/README.md +++ b/anthropic/README.md @@ -1,8 +1,24 @@ # Anthropic Rust SDK +[![Crates.io][crates-badge]][crates-url] +[![MIT licensed][mit-badge]][mit-url] +[![APACHE-2.0 licensed][apache-badge]][apache-url] +[![Build Status][actions-badge]][actions-url] + +[crates-badge]: https://img.shields.io/crates/v/anthropic-rs.svg +[crates-url]: https://crates.io/crates/anthropic-rs +[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg +[mit-url]: https://github.com/roushou/anthropic-rs/blob/master/LICENSE-MIT +[apache-badge]: https://img.shields.io/badge/license-apache-blue.svg +[apache-url]: https://github.com/roushou/anthropic-rs/blob/master/LICENSE-APACHE +[actions-badge]: https://github.com/roushou/anthropic-rs/workflows/CI/badge.svg +[actions-url]: https://github.com/roushou/anthropic-rs/actions?query=workflow%3ACI+branch%3Amaster + This is an unofficial Rust SDK for the Anthropic API. -## Basic usage +## Usage + +A basic example to stream messages. ```rs use anthropic_rs::{ @@ -27,7 +43,7 @@ async fn main() { role: Role::User, content: vec![Content { content_type: ContentType::Text, - text: "Hello World".to_string(), + text: "Explain the theory of relativity".to_string(), }], }], ..Default::default() @@ -37,3 +53,7 @@ async fn main() { println!("{:?}", result); } ``` + +## License + +This project is licensed under the [MIT license](./LICENSE-MIT) and [Apache-2.0](./LICENSE-APACHE) license.