mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
Introduce the first version of the /chat route that mimics the OpenAI API
This commit is contained in:
parent
5d0d12dfbd
commit
5400f3941a
6 changed files with 251 additions and 5 deletions
|
@ -308,6 +308,9 @@ pub enum Action {
|
|||
#[serde(rename = "network.update")]
|
||||
#[deserr(rename = "network.update")]
|
||||
NetworkUpdate,
|
||||
#[serde(rename = "chat.get")]
|
||||
#[deserr(rename = "chat.get")]
|
||||
ChatGet,
|
||||
}
|
||||
|
||||
impl Action {
|
||||
|
@ -349,6 +352,7 @@ impl Action {
|
|||
EXPERIMENTAL_FEATURES_UPDATE => Some(Self::ExperimentalFeaturesUpdate),
|
||||
NETWORK_GET => Some(Self::NetworkGet),
|
||||
NETWORK_UPDATE => Some(Self::NetworkUpdate),
|
||||
CHAT_GET => Some(Self::ChatGet),
|
||||
_otherwise => None,
|
||||
}
|
||||
}
|
||||
|
@ -397,4 +401,6 @@ pub mod actions {
|
|||
|
||||
pub const NETWORK_GET: u8 = NetworkGet.repr();
|
||||
pub const NETWORK_UPDATE: u8 = NetworkUpdate.repr();
|
||||
|
||||
pub const CHAT_GET: u8 = ChatGet.repr();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue