Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Commit

Permalink
doc: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
roushou committed Aug 16, 2024
1 parent 5e154e6 commit f59eaad
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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::{
Expand All @@ -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()
Expand All @@ -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.
24 changes: 22 additions & 2 deletions anthropic/README.md
Original file line number Diff line number Diff line change
@@ -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::{
Expand All @@ -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()
Expand All @@ -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.

0 comments on commit f59eaad

Please sign in to comment.