feat(chat): add the 'system' and 'tool' message roles (#10)
* add the 'system' and 'tool' message roles (see: https://docs.mistral.ai/capabilities/completion/ ) * docs(chat): add offical doc link in ChatMessageRole * ci(github): listen to pull_request event in Test workflow --------- Co-authored-by: Ivan Gabriele <ivan.gabriele@protonmail.com>
This commit is contained in:
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -1,6 +1,8 @@
|
||||
name: Test
|
||||
|
||||
on: push
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
||||
@@ -30,12 +30,17 @@ impl ChatMessage {
|
||||
}
|
||||
}
|
||||
|
||||
/// See the [Mistral AI API documentation](https://docs.mistral.ai/capabilities/completion/#chat-messages) for more information.
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
|
||||
pub enum ChatMessageRole {
|
||||
#[serde(rename = "system")]
|
||||
System,
|
||||
#[serde(rename = "assistant")]
|
||||
Assistant,
|
||||
#[serde(rename = "user")]
|
||||
User,
|
||||
#[serde(rename = "tool")]
|
||||
Tool,
|
||||
}
|
||||
|
||||
/// The format that the model must output.
|
||||
|
||||
Reference in New Issue
Block a user