-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
89 lines (77 loc) · 3.43 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
[package]
name = "translators"
version = "0.1.9"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
strum = "0.24.1"
strum_macros = "0.24.1"
envy = "0.4.1"
reqwest = { version = "0.11", features = ["json", "blocking"] }
serde = { version = "1.0.159", features = ["derive"] }
serde_json = "1.0.95"
whatlang = { version = "0.16.2", optional = true }
lingua = { version = "1.4.0", optional = true }
futures = { version = "0.3.28", optional = true }
tokio = { version = "1.0", optional = true }
chatgpt_rs = { git = "https://github.com/JustFrederik/chatgpt_rs.git", rev = "5f60316", features = ["gpt3"], optional = true }
regex = { version = "1.8.1", optional = true }
serde_urlencoded = { version = "0.7.1", optional = true }
select = { version = "0.6.0", optional = true }
csv = { version = "1.1", optional = true }
codegen = { version = "0.2.0", optional = true }
edge-gpt = { version = "0.3.3", optional = true }
hmac = { version = "0.12.1", optional = true }
md-5 = { version = "0.10.5", optional = true }
base64 = { version = "0.21.0", optional = true }
uuid = { version = "1.3.2", features = ["v4"], optional = true }
sentencepiece = { version = "0.11.1", optional = true }
model-manager = { git = "https://github.com/JustFrederik/model_manager.git", rev = "aee991c", optional = true }
rustyctranslate2 = { git = "https://github.com/JustFrederik/rustyctranslate2", rev = "8ac5fa5", optional = true }
#model-manager = { path = "../model_manager", optional = true }
#rustyctranslate2 = { path = "../rustctranslate2", optional = true }
chrono = { version = "0.4.19", optional = true }
sha256 = { version = "1.0.3", optional = true }
md5_alt = { package = 'md5', version = "0.7.0", optional = true }
log = "0.4.17"
llm = { git = "https://github.com/rustformers/llm" , branch = "main", optional = true }
rand = { version = "0.8.4", optional = true }
[features]
default = ["whatlang-detector", "online", "fetch_languages", "generate"]
whatlang-detector = ["dep:whatlang"]
lingua-detector = ["dep:lingua"]
all-detectors = ["whatlang-detector", "lingua-detector"]
#Google is always available
deepl = []
mymemory = []
chatgpt = ["dep:chatgpt_rs", "chatgpt_rs?/gpt3", "dep:futures"]
libre = []
youdao = ["dep:chrono", "dep:sha256"]
baidu = ["dep:md5_alt"]
papago = []
api = ["chatgpt", "deepl", "libre", "mymemory", "baidu", "youdao", "papago"]
papago-scrape = ["dep:hmac", "dep:md-5", "dep:base64", "dep:uuid", "uuid?/v4"]
google-scrape = []
youdao-scrape = []
edge-gpt-scrape = ["dep:edge-gpt", "dep:futures"]
baidu-scrape = ["dep:serde_urlencoded"]
bing-scrape = ["dep:regex", "dep:serde_urlencoded"]
scraper = ["bing-scrape", "papago-scrape", "youdao-scrape", "baidu-scrape", "google-scrape", "edge-gpt-scrape"]
online = ["api", "scraper"]
ctranslate_req = ["dep:sentencepiece", "dep:model-manager", "dep:rustyctranslate2"]
jparacrawl = ["ctranslate_req"]
sugoi = ["ctranslate_req", "dep:regex"]
m2m100 = ["ctranslate_req", "dep:rand"]
nllb = ["ctranslate_req", "dep:rand"]
bloom = ["dep:llm", "dep:rand"]
gpt2 = ["dep:llm", "dep:rand"]
gptj = ["dep:llm", "dep:rand"]
gptneox = ["dep:llm", "dep:rand"]
llama = ["dep:llm", "dep:rand"]
offline = ["jparacrawl", "sugoi", "m2m100", "nllb", "bloom", "gpt2", "gptj", "gptneox", "llama"]
all-translators = ["online", "offline"]
fetch_languages = ["dep:select"]
generate = ["dep:codegen", "dep:csv"]
[dev-dependencies]
dotenv = "0.15.0"
tokio = { version = "1.0", features = ["full"] }