rig-core 0.36.0

An opinionated library for building LLM powered applications.
Documentation
//! Copilot agent completion smoke test.

use rig::client::CompletionClient;
use rig::completion::Prompt;

use crate::copilot::{LIVE_MODEL, live_client};
use crate::support::{BASIC_PREAMBLE, BASIC_PROMPT, assert_nonempty_response};

#[tokio::test]
#[ignore = "requires Copilot credentials or existing OAuth cache"]
async fn completion_smoke() {
    let agent = live_client()
        .agent(LIVE_MODEL)
        .preamble(BASIC_PREAMBLE)
        .build();

    let response = agent
        .prompt(BASIC_PROMPT)
        .await
        .expect("completion should succeed");

    assert_nonempty_response(&response);
}