mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
15 lines
305 B
Rust
15 lines
305 B
Rust
use anyhow::Error;
|
|
use lib_infra::async_trait::async_trait;
|
|
|
|
mod entities;
|
|
pub mod open_ai;
|
|
pub mod stability_ai;
|
|
|
|
#[async_trait]
|
|
pub trait TextCompletion: Send + Sync {
|
|
type Input: Send + 'static;
|
|
type Output;
|
|
|
|
async fn text_completion(&self, params: Self::Input) -> Result<Self::Output, Error>;
|
|
}
|