#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic, missing_docs)]
use static_assertions::assert_impl_all;
mod reexport_presence {
#[allow(unused_imports)]
use honcho_ai::{
ConclusionRepresentationBuilder, ConclusionResponse, Environment, HonchoError,
HonchoParams, MessageBuilder, MessagePage, Page, PageResponse, ReasoningLevel, Result,
SessionRepresentationBuilder, SessionResponse,
};
}
assert_impl_all!(honcho_ai::HonchoError: std::error::Error, Send, Sync);
assert_impl_all!(honcho_ai::types::message::MessageResponse: Send, Sync);
assert_impl_all!(honcho_ai::Page<honcho_ai::types::message::MessageResponse>: Send);
const _: fn() = || {
fn takes<T: From<honcho_ai::Peer>>() {}
takes::<honcho_ai::session::PeerSpec>();
};
const _: fn() = || {
fn takes_ref<'a, T: From<&'a honcho_ai::Peer>>() {}
takes_ref::<honcho_ai::session::PeerSpec>();
};
const _MESSAGE_CREATED_AT: fn(&honcho_ai::Message) -> chrono::DateTime<chrono::Utc> =
honcho_ai::Message::created_at;
const _CONCLUSION_CREATED_AT: fn(&honcho_ai::Conclusion) -> chrono::DateTime<chrono::Utc> =
honcho_ai::Conclusion::created_at;
const _SESSION_CREATED_AT: fn(&honcho_ai::Session) -> chrono::DateTime<chrono::Utc> =
honcho_ai::Session::created_at;
#[cfg(feature = "blocking")]
const _BLOCKING_SESSION_CREATED_AT: fn(
&honcho_ai::blocking::Session,
) -> chrono::DateTime<chrono::Utc> = honcho_ai::blocking::Session::created_at;
#[cfg(feature = "blocking")]
const _BLOCKING_CONCLUSION_CREATED_AT: fn(
&honcho_ai::blocking::Conclusion,
) -> chrono::DateTime<chrono::Utc> = honcho_ai::blocking::Conclusion::created_at;
#[allow(dead_code)]
fn _builders_compile(c: &honcho_ai::Honcho) {
let _peer_fut = c.peer("a").build();
let _session_fut = c.session("s").build();
let _search_fut = c.search("q").build();
let peer_cfg = std::collections::HashMap::new();
let _peer_cfg_fut = c.peer("a").config(peer_cfg).build();
let _session_cfg_fut = c
.session("s")
.configuration(honcho_ai::SessionConfiguration::default())
.build();
}
#[test]
fn api_surface_compiles() {
}