TG Telegram Group & Channel
Rust | United States America (US)
Create: Update:

🦀 Инструмент разработки портативных, модульных и легких Fullstack агентов

cargo add rig-core


rust 
use rig::{completion::Prompt, providers::openai};

#[tokio::main]
async fn main() {
// Create OpenAI client and model
// This requires the `OPENAI_API_KEY` environment variable to be set.
let openai_client = openai::Client::from_env();

let gpt4 = openai_client.agent("gpt-4").build();

// Prompt the model and print its response
let response = gpt4
.prompt("Who are you?")
.await
.expect("Failed to prompt GPT-4");

println!("GPT-4: {response}");
}

★ 2378

🖥 Github

@rust_code

🦀 Инструмент разработки портативных, модульных и легких Fullstack агентов

cargo add rig-core


rust 
use rig::{completion::Prompt, providers::openai};

#[tokio::main]
async fn main() {
// Create OpenAI client and model
// This requires the `OPENAI_API_KEY` environment variable to be set.
let openai_client = openai::Client::from_env();

let gpt4 = openai_client.agent("gpt-4").build();

// Prompt the model and print its response
let response = gpt4
.prompt("Who are you?")
.await
.expect("Failed to prompt GPT-4");

println!("GPT-4: {response}");
}

★ 2378

🖥 Github

@rust_code
Please open Telegram to view this post
VIEW IN TELEGRAM


>>Click here to continue<<

Rust






Share with your best friend
VIEW MORE

United States America Popular Telegram Group (US)