Skip to content

Commit

Permalink
feat: update the examples of moderations apis
Browse files Browse the repository at this point in the history
  • Loading branch information
YanceyOfficial committed Oct 23, 2024
1 parent c59323e commit 8975c57
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/moderations/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use dotenvy::dotenv;
use rs_openai::{
moderations::{CreateModerationRequestBuilder, ModerationModel},
moderations::CreateModerationRequestBuilder,
OpenAI,
};
use std::env::var;
Expand All @@ -18,7 +18,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// create
let req = CreateModerationRequestBuilder::default()
.input(["Do you want to build a snowman?", "I will kill you."])
.model(ModerationModel::Latest)
.build()?;

let res = client.moderations().create(&req).await?;
Expand Down

0 comments on commit 8975c57

Please sign in to comment.