mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-11-10 22:00:40 +08:00
AI endpoint -> url setting rename
This commit is contained in:
parent
a4d93341da
commit
51ccdf0c03
4 changed files with 6 additions and 7 deletions
|
|
@ -129,8 +129,8 @@ These are some of our open-source sponsors:
|
||||||
|
|
||||||
## Roadmap
|
## Roadmap
|
||||||
|
|
||||||
|
- [ ] CalDAV, CardDAV and WebDAV support
|
||||||
- [ ] JMAP Calendar, Contacts and Tasks support
|
- [ ] JMAP Calendar, Contacts and Tasks support
|
||||||
- [ ] CalDAV and CardDAV support
|
|
||||||
- [ ] ActiveSync support
|
- [ ] ActiveSync support
|
||||||
|
|
||||||
See the [enhancement requests](https://github.com/stalwartlabs/mail-server/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Aenhancement) page for a full list of proposed features by the community.
|
See the [enhancement requests](https://github.com/stalwartlabs/mail-server/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Aenhancement) page for a full list of proposed features by the community.
|
||||||
|
|
@ -139,7 +139,7 @@ See the [enhancement requests](https://github.com/stalwartlabs/mail-server/issue
|
||||||
|
|
||||||
Part of the development of this project was funded through the [NGI0 Entrust Fund](https://nlnet.nl/entrust), a fund established by [NLnet](https://nlnet.nl/) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu/) programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101069594.
|
Part of the development of this project was funded through the [NGI0 Entrust Fund](https://nlnet.nl/entrust), a fund established by [NLnet](https://nlnet.nl/) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu/) programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101069594.
|
||||||
|
|
||||||
If you find the project useful you can help by [becoming a sponsor](https://liberapay.com/stalwartlabs). Thank you!
|
If you find the project useful you can help by [becoming a sponsor](https://opencollective.com/stalwart). Thank you!
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ use utils::config::Config;
|
||||||
|
|
||||||
use crate::config::parse_http_headers;
|
use crate::config::parse_http_headers;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct AiApiConfig {
|
pub struct AiApiConfig {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub api_type: ApiType,
|
pub api_type: ApiType,
|
||||||
|
|
@ -28,7 +28,7 @@ pub struct AiApiConfig {
|
||||||
pub default_temperature: f64,
|
pub default_temperature: f64,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub enum ApiType {
|
pub enum ApiType {
|
||||||
ChatCompletion,
|
ChatCompletion,
|
||||||
TextCompletion,
|
TextCompletion,
|
||||||
|
|
@ -199,7 +199,7 @@ impl AiApiConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse(config: &mut Config, id: &str) -> Option<Self> {
|
pub fn parse(config: &mut Config, id: &str) -> Option<Self> {
|
||||||
let url = config.value(("enterprise.ai", id, "endpoint"))?.to_string();
|
let url = config.value(("enterprise.ai", id, "url"))?.to_string();
|
||||||
let api_type = match config.value(("enterprise.ai", id, "type"))? {
|
let api_type = match config.value(("enterprise.ai", id, "type"))? {
|
||||||
"chat" => ApiType::ChatCompletion,
|
"chat" => ApiType::ChatCompletion,
|
||||||
"text" => ApiType::TextCompletion,
|
"text" => ApiType::TextCompletion,
|
||||||
|
|
|
||||||
|
|
@ -728,7 +728,6 @@ impl Store {
|
||||||
|
|
||||||
#[cfg(feature = "test_mode")]
|
#[cfg(feature = "test_mode")]
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
|
|
||||||
pub async fn assert_is_empty(&self, blob_store: crate::BlobStore) {
|
pub async fn assert_is_empty(&self, blob_store: crate::BlobStore) {
|
||||||
use utils::codec::leb128::Leb128Iterator;
|
use utils::codec::leb128::Leb128Iterator;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ path = "{PATH}/test_antispam.db"
|
||||||
#url = "redis://127.0.0.1"
|
#url = "redis://127.0.0.1"
|
||||||
|
|
||||||
[enterprise.ai.dummy]
|
[enterprise.ai.dummy]
|
||||||
endpoint = "https://127.0.0.1:9090/v1/chat/completions"
|
url = "https://127.0.0.1:9090/v1/chat/completions"
|
||||||
type = "chat"
|
type = "chat"
|
||||||
model = "gpt-dummy"
|
model = "gpt-dummy"
|
||||||
allow-invalid-certs = true
|
allow-invalid-certs = true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue