1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! # Language Model
//!
//! This crate provides a unified interface for language models. It supports streaming text, sampling, and embedding.
//!
//! ## Usage (with the RPhi implementation crate)
//!
//! ```rust, no_run
//! use rphi::prelude::*;
//!
//! #[tokio::main]
//! async fn main() {
//! let mut model = Phi::default();
//! let prompt = "The capital of France is ";
//! let mut result = model.stream_text(prompt).await.unwrap();
//!
//! print!("{prompt}");
//! while let Some(token) = result.next().await {
//! print!("{token}");
//! }
//! }
//! ```
pub use *;
pub use *;
pub use *;
pub use StreamExt;
pub use kalosm_sample;
pub use *;
pub use *;