mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-07 11:11:30 +00:00
16 lines
380 B
Rust
16 lines
380 B
Rust
pub enum TruncationDirection {
|
|
Start,
|
|
End,
|
|
}
|
|
|
|
pub trait LanguageModel {
|
|
fn name(&self) -> String;
|
|
fn count_tokens(&self, content: &str) -> anyhow::Result<usize>;
|
|
fn truncate(
|
|
&self,
|
|
content: &str,
|
|
length: usize,
|
|
direction: TruncationDirection,
|
|
) -> anyhow::Result<String>;
|
|
fn capacity(&self) -> anyhow::Result<usize>;
|
|
}
|