Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
da98972
feat: support UMAMI analytics
wzxjohn May 16, 2025
ef0780c
feat: if video cannot play open in a new tab
feitianbubu Aug 10, 2025
511489d
add submodel.ai
danding5 Sep 8, 2025
23e4249
merge
danding5 Sep 8, 2025
99a8b5e
fix:Account Management Status
QAbot-zh Sep 10, 2025
42d2975
Merge branches 'main' and 'main' of github.com:danding5/new-api
danding5 Sep 10, 2025
78b0f89
merge
danding5 Sep 10, 2025
a12ed57
merge
danding5 Sep 10, 2025
4658309
fix: get video task err when Content-Type=json
feitianbubu Sep 10, 2025
cab5622
Merge branch 'main' of github.com:danding5/new-api
danding5 Sep 15, 2025
274872b
add submodel icon
danding5 Sep 15, 2025
51c4cd9
feat: 重构ollama渠道请求
somnifex Sep 15, 2025
fc38c48
fix: 优化ollamaChatStreamChunk结构体字段格式
somnifex Sep 15, 2025
7d6ba52
refactor: 更新请求转换逻辑,优化工具调用解析
somnifex Sep 15, 2025
176fd6e
fix: 优化ollamaStreamHandler中的停止和最终使用响应逻辑
somnifex Sep 15, 2025
f7d393f
refactor: 简化请求转换函数和流处理逻辑
somnifex Sep 15, 2025
9d952e0
fix: 修复ollamaChatHandler中的FinishReason字段赋值逻辑
somnifex Sep 15, 2025
4eeca08
fix: 修复图像URL处理逻辑,确保正确生成base64数据
somnifex Sep 16, 2025
6254971
fix: 添加对Thinking字段的处理逻辑,确保推理内容正确传递
somnifex Sep 16, 2025
1dd78b8
fix: 修复ollamaChatHandler中ReasoningContent字段的赋值逻辑
somnifex Sep 16, 2025
69a88a0
feat: 添加ollama聊天流处理和非流处理功能
somnifex Sep 16, 2025
f19b5b8
chore: 删除历史文件
somnifex Sep 16, 2025
f2e9fd7
fix(relay): wrong URL for claude model in GCP Vertex AI
wzxjohn Sep 16, 2025
4b98773
优化渠道测试
RixAPI Sep 16, 2025
6c0b168
fix(relay-xunfei): 修复讯飞渠道无法使用问题 #1740
joesonshaw Sep 19, 2025
8d92ce3
fix(relay): wrong key param while enable sse
wzxjohn Sep 19, 2025
ec9903e
feat: jump between section on channel edit page
JoeyLearnsToCode Sep 19, 2025
b4a6721
Merge branch 'QuantumNous:main' into main
joesonshaw Sep 19, 2025
2a54e98
feat: add duplicate key removal function when edit or add new channel
HynoR Sep 21, 2025
b692452
Merge pull request #1769 from QAbot-zh/fix/account-status
seefs001 Sep 22, 2025
25a8473
feat: volcengine支持自定义域名
Sep 27, 2025
e0c6900
pref: 优化代码
Sep 27, 2025
79859a3
Merge pull request #1070 from wzxjohn/feature/umami
seefs001 Sep 27, 2025
ad72500
feat: allow stripe promotion code
seefs001 Sep 27, 2025
a498da7
Merge pull request #1887 from seefs001/fix/stripe
seefs001 Sep 27, 2025
9e8b999
feat: gemini urlContext
seefs001 Sep 27, 2025
096141b
Merge pull request #1888 from seefs001/feature/gemini-urlcontext
seefs001 Sep 27, 2025
b294ff5
Merge pull request #1554 from feitianbubu/pr/fix-video-preview
seefs001 Sep 27, 2025
ffc0774
Merge pull request #1862 from HynoR/fix/dup3
seefs001 Sep 27, 2025
e4efa34
pref: 防呆设计需要,不允许自定义,API地址优化为下拉选择
Sep 27, 2025
923308a
fix: 默认选择国内地址,不设置base url弹窗提示
Sep 27, 2025
266f578
Ajout de la traduction française à l'interface utilisateur.
google-labs-jules[bot] Sep 25, 2025
6736762
Ajout de la traduction française du fichier README.
google-labs-jules[bot] Sep 25, 2025
2a0ecf3
Ajout du lien vers la traduction française dans le fichier README.md …
google-labs-jules[bot] Sep 25, 2025
25dfc0a
Ajout du lien vers la traduction française dans le fichier README.en.md.
google-labs-jules[bot] Sep 25, 2025
3e941fd
feat(i18n): complete French locale and add common.changeLanguage
google-labs-jules[bot] Sep 25, 2025
72177c2
fix(i18n): nest common.changeLanguage under common object
google-labs-jules[bot] Sep 25, 2025
79a252f
fix(test): Make language verification script more robust
comeback01 Sep 27, 2025
f354e5d
✨ feat(layout): refine footer visibility logic to target CardPro comp…
t0ng7u Sep 27, 2025
2e4405e
Merge remote-tracking branch 'origin/main' into feature/volcengine-ba…
Sep 27, 2025
74122e4
Merge pull request #1886 from ShibaInu64/feature/volcengine-base-url
seefs001 Sep 27, 2025
c68fd36
feat: 添加代理客户端缓存和重置功能,优化 HTTP 客户端管理
RedwindA Sep 27, 2025
486c828
feat: 在添加和更新渠道时重置代理客户端缓存
RedwindA Sep 27, 2025
466d19c
fix: add missing timeout
RedwindA Sep 27, 2025
6659a8a
Merge pull request #1836 from joesonshaw/main
Calcium-Ion Sep 27, 2025
ee7ce5a
feat: 添加 openrouter-enterprise 支持
creamlike1024 Sep 28, 2025
3ed0ae8
Merge remote-tracking branch 'remotes/up-origin/main' into feat-chann…
JoeyLearnsToCode Sep 28, 2025
bdefed7
Merge pull request #1811 from somnifex/main
Calcium-Ion Sep 28, 2025
f6be18e
Merge pull request #1819 from RixAPI/main
Calcium-Ion Sep 28, 2025
6e6a96d
feat: enhance OpenRouter enterprise support with new settings and res…
Calcium-Ion Sep 28, 2025
b91eb8a
Merge remote-tracking branch 'origin/openrouter-enterprise' into open…
Calcium-Ion Sep 28, 2025
7fe969c
fix: streamline error handling in OpenRouter response processing
Calcium-Ion Sep 28, 2025
045ba23
Merge pull request #1897 from QuantumNous/openrouter-enterprise
Calcium-Ion Sep 28, 2025
b08f188
fix(settings): correct third-party binding states and unify Telegram
RedwindA Sep 28, 2025
e2798fa
fix(settings): ensure turnstile settings are reset when disabled
RedwindA Sep 28, 2025
f71bf9e
Merge remote-tracking branch 'upstream/main' into traduction
comeback01 Sep 28, 2025
9a1ef8b
Merge branch 'main-upstream' into fix/volcengine_default_baseurl
seefs001 Sep 29, 2025
d916456
Merge pull request #1894 from RedwindA/refactor/enhance-channel-proxy
seefs001 Sep 29, 2025
a2b5efb
Merge pull request #1904 from RedwindA/fix/wechat-display
seefs001 Sep 29, 2025
7d49ce6
fix: set volcengine default url
seefs001 Sep 29, 2025
bf9a5f5
Merge branch 'main-upstream' into fix/volcengine_default_baseurl
seefs001 Sep 29, 2025
a91f3e7
Merge pull request #1910 from seefs001/fix/volcengine_default_baseurl
seefs001 Sep 29, 2025
09e5e5d
fix(http_client): improve error message for unsupported proxy schemes
Calcium-Ion Sep 29, 2025
4c2979b
Merge branch 'QuantumNous:main' into main
danding5 Sep 29, 2025
e647878
Merge branch 'main' into traduction
comeback01 Sep 29, 2025
9c2082f
Chore: remove temporary verification script
comeback01 Sep 29, 2025
5840de1
Update relay_adaptor.go
danding5 Sep 29, 2025
e71df43
feat(i18n): add French translation for stripe promo codes
comeback01 Sep 29, 2025
d0a8504
Update render.jsx
danding5 Sep 29, 2025
c2bbfd7
chore: remove bun_output.log and package-lock.json files
Calcium-Ion Sep 29, 2025
6983d9f
Merge pull request #1889 from comeback01/traduction
Calcium-Ion Sep 29, 2025
c366093
Merge remote-tracking branch 'origin/main'
Calcium-Ion Sep 29, 2025
c7a5237
fix(models): increase varchar length for TaskID and Username fields #…
Calcium-Ion Sep 29, 2025
dcf4336
feat: passkey
seefs001 Sep 29, 2025
ca0eaa7
解锁deepseek补全倍率;允许deepseek渠道获取模型
RedwindA Sep 29, 2025
9f989fc
Merge pull request #1913 from RedwindA/fix/deepseek-ratio
seefs001 Sep 29, 2025
8c5b665
Merge branch 'QuantumNous:main' into main
danding5 Sep 29, 2025
1b627dd
fix: sync third-party binding state in personal settings
RedwindA Sep 29, 2025
fc2d992
Update constant/api_type.go
danding5 Sep 29, 2025
d249532
fix: Redirect address after successful tg binding
tbphp Sep 29, 2025
6c0a79d
Merge pull request #1918 from tbphp/fix-tg-302
seefs001 Sep 29, 2025
4bb4b64
Merge pull request #1916 from RedwindA/fix/3rd-binding-state
seefs001 Sep 29, 2025
83b2b07
Merge pull request #1915 from danding5/main
seefs001 Sep 29, 2025
84cdd24
feat: passkey wip
seefs001 Sep 29, 2025
76180b1
fix: submodel adapter
seefs001 Sep 29, 2025
25a3896
Merge pull request #1919 from seefs001/fix/submodel
seefs001 Sep 29, 2025
fa45cb5
fix: Optimize sidebar refresh to avoid redundant loading states
RedwindA Sep 29, 2025
d7db30a
feat: support claude-sonnet-4-5-20250929
prnake Sep 30, 2025
30cb3b8
feat: claude context editing
seefs001 Sep 30, 2025
3154440
Merge pull request #1924 from prnake/claude-4-5
seefs001 Sep 30, 2025
7d7ffc0
Merge pull request #1921 from RedwindA/refactor/improve-sidebar-perf
seefs001 Sep 30, 2025
8118424
fix: claude beta=true
seefs001 Sep 30, 2025
3b306bb
Merge pull request #1926 from seefs001/fix/claude-beta
seefs001 Sep 30, 2025
933ab43
Merge pull request #1925 from seefs001/feature/claude-context-editing
seefs001 Sep 30, 2025
595e3fe
Merge pull request #1920 from QuantumNous/alpha
Calcium-Ion Sep 30, 2025
8e10af8
fix(main): conditionally log missing .env file message based on debug…
Calcium-Ion Sep 30, 2025
aab82f2
Merge pull request #1817 from wzxjohn/hotfix/relay_vertex_claude
seefs001 Sep 30, 2025
e8425ad
feat: 通用二步验证
seefs001 Sep 30, 2025
4c13666
Merge branch 'main-upstream' into feature/passkey
seefs001 Sep 30, 2025
013a575
fix: personal setting
seefs001 Sep 30, 2025
9f20e49
Merge pull request #1912 from seefs001/feature/passkey
seefs001 Sep 30, 2025
ab16664
fix: blob type
seefs001 Sep 30, 2025
d026edc
Merge pull request #1930 from seefs001/feature/passkey
seefs001 Sep 30, 2025
e71407e
fix: passkey security
seefs001 Sep 30, 2025
7533ffc
Merge pull request #1931 from seefs001/feature/passkey
seefs001 Sep 30, 2025
c4e0fc1
chore: go version & sonic dep
seefs001 Sep 30, 2025
fcc6172
fix: passkey rpid detect
seefs001 Sep 30, 2025
1bd791d
Merge pull request #1934 from seefs001/fix/passkey
Calcium-Ion Sep 30, 2025
0a6f39e
fix: passkey 文案
seefs001 Sep 30, 2025
3ba2aae
Merge pull request #1936 from seefs001/fix/passkey
Calcium-Ion Sep 30, 2025
6bc3e62
feat: add endpoint type selection to channel testing functionality
Calcium-Ion Sep 30, 2025
0b91e45
fix(adaptor): update relay mode handling to support relay format
Calcium-Ion Sep 30, 2025
0735b0c
feat(i18n): add and update French translations
comeback01 Sep 30, 2025
f5a774f
fix(jina): remove encoding_format for jina embedding
RedwindA Sep 30, 2025
15db5c0
Merge pull request #1943 from RedwindA/fix/jina-embedding
seefs001 Oct 1, 2025
70263e9
feat: 支持 gemini-robotics-er-1.5-preview
creamlike1024 Oct 1, 2025
96b172e
Merge pull request #1945 from QuantumNous/gemini-robotics-er
seefs001 Oct 1, 2025
ec76b0f
feat: add visual editing mode for chat configurations
HynoR Oct 1, 2025
1428338
feat: Enhance SettingsChats edit interface
HynoR Oct 1, 2025
85ff8b1
feat: add Gotify notification option for quota alerts
RedwindA Oct 1, 2025
d6db10b
feat: 添加 Bark 和 Gotify 通知的国际化支持
RedwindA Oct 1, 2025
2200bb9
fix(openai): add nil checks for web_search streaming to prevent panic
RedwindA Oct 1, 2025
0e9ad4a
fix: missing field & field control
seefs001 Oct 1, 2025
2938246
Merge pull request #1949 from RedwindA/fix/oai-responses-webSearch-panic
seefs001 Oct 1, 2025
c320410
feat: add doubao video generate
feitianbubu Oct 1, 2025
b244a06
feat: add doubao video use quota by total token
feitianbubu Oct 1, 2025
7ca65a5
feat: add doubao video add log detail
feitianbubu Oct 1, 2025
c1492be
Merge pull request #1954 from QuantumNous/main
seefs001 Oct 2, 2025
26a563d
fix: Return the original payload and nil error on Unmarshal or Marsha…
seefs001 Oct 2, 2025
649a520
Merge pull request #1950 from seefs001/fix/missing-field
seefs001 Oct 2, 2025
dae661b
Merge pull request #1948 from RedwindA/feat/gotify
seefs001 Oct 2, 2025
9e68286
Merge pull request #1947 from HynoR/feat/newedit
seefs001 Oct 2, 2025
e904359
Merge branch 'alpha' into feat-channel-block-edit
seefs001 Oct 2, 2025
92a4e88
Merge pull request #1844 from JoeyLearnsToCode/feat-channel-block-edit
seefs001 Oct 2, 2025
6a1de0e
fix: merge conflict
seefs001 Oct 2, 2025
4cdad47
Merge pull request #1955 from seefs001/fix/megge-conflict
seefs001 Oct 2, 2025
acbfc9d
Merge pull request #1951 from feitianbubu/pr/add-doubao-video
seefs001 Oct 2, 2025
3d1433d
Merge branch 'alpha' into pr/fix-video-get-task
seefs001 Oct 2, 2025
4137120
Merge pull request #1779 from feitianbubu/pr/fix-video-get-task
seefs001 Oct 2, 2025
0769184
Merge pull request #1956 from QuantumNous/alpha
Calcium-Ion Oct 2, 2025
01469aa
refactor(adaptor): extract common header operations into a separate f…
Calcium-Ion Oct 2, 2025
81a66be
chore(docker): switch from MySQL to PostgreSQL in docker-compose conf…
Calcium-Ion Oct 2, 2025
6ee01d7
Merge branch 'main' into french-translation-final
comeback01 Oct 2, 2025
9061411
Merge pull request #1940 from comeback01/french-translation-final
Calcium-Ion Oct 2, 2025
f473d20
Merge pull request #1932 from seefs001/chore/upgrade-deps
Calcium-Ion Oct 2, 2025
df19a8d
✨ feat(layout): refine footer visibility logic to target CardPro comp…
t0ng7u Sep 27, 2025
36ed41a
Merge remote-tracking branch 'origin/pr/console-footer' into pr/conso…
Calcium-Ion Oct 2, 2025
ace855e
refactor(footer): update footer links and localization text
Calcium-Ion Oct 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="right">
<a href="./README.md">中文</a> | <strong>English</strong>
<a href="./README.md">中文</a> | <strong>English</strong> | <a href="./README.fr.md">Français</a>
</p>
<div align="center">

Expand Down
216 changes: 216 additions & 0 deletions README.fr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
<p align="right">
<a href="./README.md">中文</a> | <a href="./README.en.md">English</a> | <strong>Français</strong>
</p>
<div align="center">

![new-api](/web/public/logo.png)

# New API

🍥 Passerelle de modèles étendus de nouvelle génération et système de gestion d'actifs d'IA

<a href="https://trendshift.io/repositories/8227" target="_blank"><img src="https://trendshift.io/api/badge/repositories/8227" alt="Calcium-Ion%2Fnew-api | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>

<p align="center">
<a href="https://raw.githubusercontent.com/Calcium-Ion/new-api/main/LICENSE">
<img src="https://img.shields.io/github/license/Calcium-Ion/new-api?color=brightgreen" alt="licence">
</a>
<a href="https://github.com/Calcium-Ion/new-api/releases/latest">
<img src="https://img.shields.io/github/v/release/Calcium-Ion/new-api?color=brightgreen&include_prereleases" alt="version">
</a>
<a href="https://github.com/users/Calcium-Ion/packages/container/package/new-api">
<img src="https://img.shields.io/badge/docker-ghcr.io-blue" alt="docker">
</a>
<a href="https://hub.docker.com/r/CalciumIon/new-api">
<img src="https://img.shields.io/badge/docker-dockerHub-blue" alt="docker">
</a>
<a href="https://goreportcard.com/report/github.com/Calcium-Ion/new-api">
<img src="https://goreportcard.com/badge/github.com/Calcium-Ion/new-api" alt="GoReportCard">
</a>
</p>
</div>

## 📝 Description du projet

> [!NOTE]
> Il s'agit d'un projet open-source développé sur la base de [One API](https://github.com/songquanpeng/one-api)

> [!IMPORTANT]
> - Ce projet est uniquement destiné à des fins d'apprentissage personnel, sans garantie de stabilité ni de support technique.
> - Les utilisateurs doivent se conformer aux [Conditions d'utilisation](https://openai.com/policies/terms-of-use) d'OpenAI et aux **lois et réglementations applicables**, et ne doivent pas l'utiliser à des fins illégales.
> - Conformément aux [《Mesures provisoires pour la gestion des services d'intelligence artificielle générative》](http://www.cac.gov.cn/2023-07/13/c_1690898327029107.htm), veuillez ne fournir aucun service d'IA générative non enregistré au public en Chine.

<h2>🤝 Partenaires de confiance</h2>
<p id="premium-sponsors">&nbsp;</p>
<p align="center"><strong>Sans ordre particulier</strong></p>
<p align="center">
<a href="https://www.cherry-ai.com/" target=_blank><img
src="./docs/images/cherry-studio.png" alt="Cherry Studio" height="120"
/></a>
<a href="https://bda.pku.edu.cn/" target=_blank><img
src="./docs/images/pku.png" alt="Université de Pékin" height="120"
/></a>
<a href="https://www.compshare.cn/?ytag=GPU_yy_gh_newapi" target=_blank><img
src="./docs/images/ucloud.png" alt="UCloud" height="120"
/></a>
<a href="https://www.aliyun.com/" target=_blank><img
src="./docs/images/aliyun.png" alt="Alibaba Cloud" height="120"
/></a>
<a href="https://io.net/" target=_blank><img
src="./docs/images/io-net.png" alt="IO.NET" height="120"
/></a>
</p>
<p>&nbsp;</p>

## 📚 Documentation

Pour une documentation détaillée, veuillez consulter notre Wiki officiel : [https://docs.newapi.pro/](https://docs.newapi.pro/)

Vous pouvez également accéder au DeepWiki généré par l'IA :
[![Demander à DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/QuantumNous/new-api)

## ✨ Fonctionnalités clés

New API offre un large éventail de fonctionnalités, veuillez vous référer à [Présentation des fonctionnalités](https://docs.newapi.pro/wiki/features-introduction) pour plus de détails :

1. 🎨 Nouvelle interface utilisateur
2. 🌍 Prise en charge multilingue
3. 💰 Fonctionnalité de recharge en ligne (YiPay)
4. 🔍 Prise en charge de la recherche de quotas d'utilisation avec des clés (fonctionne avec [neko-api-key-tool](https://github.com/Calcium-Ion/neko-api-key-tool))
5. 🔄 Compatible avec la base de données originale de One API
6. 💵 Prise en charge de la tarification des modèles de paiement à l'utilisation
7. ⚖️ Prise en charge de la sélection aléatoire pondérée des canaux
8. 📈 Tableau de bord des données (console)
9. 🔒 Regroupement de jetons et restrictions de modèles
10. 🤖 Prise en charge de plus de méthodes de connexion par autorisation (LinuxDO, Telegram, OIDC)
11. 🔄 Prise en charge des modèles Rerank (Cohere et Jina), [Documentation de l'API](https://docs.newapi.pro/api/jinaai-rerank)
12. ⚡ Prise en charge de l'API OpenAI Realtime (y compris les canaux Azure), [Documentation de l'API](https://docs.newapi.pro/api/openai-realtime)
13. ⚡ Prise en charge du format Claude Messages, [Documentation de l'API](https://docs.newapi.pro/api/anthropic-chat)
14. Prise en charge de l'accès à l'interface de discussion via la route /chat2link
15. 🧠 Prise en charge de la définition de l'effort de raisonnement via les suffixes de nom de modèle :
1. Modèles de la série o d'OpenAI
- Ajouter le suffixe `-high` pour un effort de raisonnement élevé (par exemple : `o3-mini-high`)
- Ajouter le suffixe `-medium` pour un effort de raisonnement moyen (par exemple : `o3-mini-medium`)
- Ajouter le suffixe `-low` pour un effort de raisonnement faible (par exemple : `o3-mini-low`)
2. Modèles de pensée de Claude
- Ajouter le suffixe `-thinking` pour activer le mode de pensée (par exemple : `claude-3-7-sonnet-20250219-thinking`)
16. 🔄 Fonctionnalité de la pensée au contenu
17. 🔄 Limitation du débit du modèle pour les utilisateurs
18. 💰 Prise en charge de la facturation du cache, qui permet de facturer à un ratio défini lorsque le cache est atteint :
1. Définir l'option `Ratio de cache d'invite` dans `Paramètres système->Paramètres de fonctionnement`
2. Définir le `Ratio de cache d'invite` dans le canal, plage de 0 à 1, par exemple, le définir sur 0,5 signifie facturer à 50 % lorsque le cache est atteint
3. Canaux pris en charge :
- [x] OpenAI
- [x] Azure
- [x] DeepSeek
- [x] Claude

## Prise en charge des modèles

Cette version prend en charge plusieurs modèles, veuillez vous référer à [Documentation de l'API-Interface de relais](https://docs.newapi.pro/api) pour plus de détails :

1. Modèles tiers **gpts** (gpt-4-gizmo-*)
2. Canal tiers [Midjourney-Proxy(Plus)](https://github.com/novicezk/midjourney-proxy), [Documentation de l'API](https://docs.newapi.pro/api/midjourney-proxy-image)
3. Canal tiers [Suno API](https://github.com/Suno-API/Suno-API), [Documentation de l'API](https://docs.newapi.pro/api/suno-music)
4. Canaux personnalisés, prenant en charge la saisie complète de l'adresse d'appel
5. Modèles Rerank ([Cohere](https://cohere.ai/) et [Jina](https://jina.ai/)), [Documentation de l'API](https://docs.newapi.pro/api/jinaai-rerank)
6. Format de messages Claude, [Documentation de l'API](https://docs.newapi.pro/api/anthropic-chat)
7. Dify, ne prend actuellement en charge que chatflow

## Configuration des variables d'environnement

Pour des instructions de configuration détaillées, veuillez vous référer à [Guide d'installation-Configuration des variables d'environnement](https://docs.newapi.pro/installation/environment-variables) :

- `GENERATE_DEFAULT_TOKEN` : S'il faut générer des jetons initiaux pour les utilisateurs nouvellement enregistrés, la valeur par défaut est `false`
- `STREAMING_TIMEOUT` : Délai d'expiration de la réponse en streaming, la valeur par défaut est de 300 secondes
- `DIFY_DEBUG` : S'il faut afficher les informations sur le flux de travail et les nœuds pour les canaux Dify, la valeur par défaut est `true`
- `FORCE_STREAM_OPTION` : S'il faut remplacer le paramètre client stream_options, la valeur par défaut est `true`
- `GET_MEDIA_TOKEN` : S'il faut compter les jetons d'image, la valeur par défaut est `true`
- `GET_MEDIA_TOKEN_NOT_STREAM` : S'il faut compter les jetons d'image dans les cas sans streaming, la valeur par défaut est `true`
- `UPDATE_TASK` : S'il faut mettre à jour les tâches asynchrones (Midjourney, Suno), la valeur par défaut est `true`
- `COHERE_SAFETY_SETTING` : Paramètres de sécurité du modèle Cohere, les options sont `NONE`, `CONTEXTUAL`, `STRICT`, la valeur par défaut est `NONE`
- `GEMINI_VISION_MAX_IMAGE_NUM` : Nombre maximum d'images pour les modèles Gemini, la valeur par défaut est `16`
- `MAX_FILE_DOWNLOAD_MB` : Taille maximale de téléchargement de fichier en Mo, la valeur par défaut est `20`
- `CRYPTO_SECRET` : Clé de chiffrement utilisée pour chiffrer le contenu de la base de données
- `AZURE_DEFAULT_API_VERSION` : Version de l'API par défaut du canal Azure, la valeur par défaut est `2025-04-01-preview`
- `NOTIFICATION_LIMIT_DURATION_MINUTE` : Durée de la limite de notification, la valeur par défaut est de `10` minutes
- `NOTIFY_LIMIT_COUNT` : Nombre maximal de notifications utilisateur dans la durée spécifiée, la valeur par défaut est `2`
- `ERROR_LOG_ENABLED=true` : S'il faut enregistrer et afficher les journaux d'erreurs, la valeur par défaut est `false`

## Déploiement

Pour des guides de déploiement détaillés, veuillez vous référer à [Guide d'installation-Méthodes de déploiement](https://docs.newapi.pro/installation) :

> [!TIP]
> Dernière image Docker : `calciumion/new-api:latest`

### Considérations sur le déploiement multi-machines
- La variable d'environnement `SESSION_SECRET` doit être définie, sinon l'état de connexion sera incohérent sur plusieurs machines
- Si vous partagez Redis, `CRYPTO_SECRET` doit être défini, sinon le contenu de Redis ne pourra pas être consulté sur plusieurs machines

### Exigences de déploiement
- Base de données locale (par défaut) : SQLite (le déploiement Docker doit monter le répertoire `/data`)
- Base de données distante : MySQL version >= 5.7.8, PgSQL version >= 9.6

### Méthodes de déploiement

#### Utilisation de la fonctionnalité Docker du panneau BaoTa
Installez le panneau BaoTa (version **9.2.0** ou supérieure), recherchez **New-API** dans le magasin d'applications et installez-le.
[Tutoriel avec des images](./docs/BT.md)

#### Utilisation de Docker Compose (recommandé)
```shell
# Télécharger le projet
git clone https://github.com/Calcium-Ion/new-api.git
cd new-api
# Modifier docker-compose.yml si nécessaire
# Démarrer
docker-compose up -d
```

#### Utilisation directe de l'image Docker
```shell
# Utilisation de SQLite
docker run --name new-api -d --restart always -p 3000:3000 -e TZ=Asia/Shanghai -v /home/ubuntu/data/new-api:/data calciumion/new-api:latest

# Utilisation de MySQL
docker run --name new-api -d --restart always -p 3000:3000 -e SQL_DSN="root:123456@tcp(localhost:3306)/oneapi" -e TZ=Asia/Shanghai -v /home/ubuntu/data/new-api:/data calciumion/new-api:latest
```

## Nouvelle tentative de canal et cache
La fonctionnalité de nouvelle tentative de canal a été implémentée, vous pouvez définir le nombre de tentatives dans `Paramètres->Paramètres de fonctionnement->Paramètres généraux`. Il est **recommandé d'activer la mise en cache**.

### Méthode de configuration du cache
1. `REDIS_CONN_STRING` : Définir Redis comme cache
2. `MEMORY_CACHE_ENABLED` : Activer le cache mémoire (pas besoin de le définir manuellement si Redis est défini)

## Documentation de l'API

Pour une documentation détaillée de l'API, veuillez vous référer à [Documentation de l'API](https://docs.newapi.pro/api) :

- [API de discussion](https://docs.newapi.pro/api/openai-chat)
- [API d'image](https://docs.newapi.pro/api/openai-image)
- [API de rerank](https://docs.newapi.pro/api/jinaai-rerank)
- [API en temps réel](https://docs.newapi.pro/api/openai-realtime)
- [API de discussion Claude (messages)](https://docs.newapi.pro/api/anthropic-chat)

## Projets connexes
- [One API](https://github.com/songquanpeng/one-api) : Projet original
- [Midjourney-Proxy](https://github.com/novicezk/midjourney-proxy) : Prise en charge de l'interface Midjourney
- [chatnio](https://github.com/Deeptrain-Community/chatnio) : Solution B/C unique d'IA de nouvelle génération
- [neko-api-key-tool](https://github.com/Calcium-Ion/neko-api-key-tool) : Interroger le quota d'utilisation avec une clé

Autres projets basés sur New API :
- [new-api-horizon](https://github.com/Calcium-Ion/new-api-horizon) : Version optimisée hautes performances de New API
- [VoAPI](https://github.com/VoAPI/VoAPI) : Version embellie du frontend basée sur New API

## Aide et support

Si vous avez des questions, veuillez vous référer à [Aide et support](https://docs.newapi.pro/support) :
- [Interaction avec la communauté](https://docs.newapi.pro/support/community-interaction)
- [Commentaires sur les problèmes](https://docs.newapi.pro/support/feedback-issues)
- [FAQ](https://docs.newapi.pro/support/faq)

## 🌟 Historique des étoiles

[![Graphique de l'historique des étoiles](https://api.star-history.com/svg?repos=Calcium-Ion/new-api&type=Date)](https://star-history.com/#Calcium-Ion/new-api&Date)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="right">
<strong>中文</strong> | <a href="./README.en.md">English</a>
<strong>中文</strong> | <a href="./README.en.md">English</a> | <a href="./README.fr.md">Français</a>
</p>
<div align="center">

Expand Down
2 changes: 2 additions & 0 deletions common/api_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ func ChannelType2APIType(channelType int) (int, bool) {
apiType = constant.APITypeJimeng
case constant.ChannelTypeMoonshot:
apiType = constant.APITypeMoonshot
case constant.ChannelTypeSubmodel:
apiType = constant.APITypeSubmodel
}
if apiType == -1 {
return constant.APITypeOpenAI, false
Expand Down
1 change: 1 addition & 0 deletions common/endpoint_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var defaultEndpointInfoMap = map[constant.EndpointType]EndpointInfo{
constant.EndpointTypeGemini: {Path: "/v1beta/models/{model}:generateContent", Method: "POST"},
constant.EndpointTypeJinaRerank: {Path: "/rerank", Method: "POST"},
constant.EndpointTypeImageGeneration: {Path: "/v1/images/generations", Method: "POST"},
constant.EndpointTypeEmbeddings: {Path: "/v1/embeddings", Method: "POST"},
}

// GetDefaultEndpointInfo 返回指定端点类型的默认信息以及是否存在
Expand Down
5 changes: 3 additions & 2 deletions constant/api_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const (
APITypeXai
APITypeCoze
APITypeJimeng
APITypeMoonshot // this one is only for count, do not add any channel after this
APITypeDummy // this one is only for count, do not add any channel after this
APITypeMoonshot
APITypeSubmodel
APITypeDummy // this one is only for count, do not add any channel after this
)
4 changes: 4 additions & 0 deletions constant/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ const (
ChannelTypeKling = 50
ChannelTypeJimeng = 51
ChannelTypeVidu = 52
ChannelTypeSubmodel = 53
ChannelTypeDoubaoVideo = 54
ChannelTypeDummy // this one is only for count, do not add any channel after this

)
Expand Down Expand Up @@ -108,4 +110,6 @@ var ChannelBaseURLs = []string{
"https://api.klingai.com", //50
"https://visual.volcengineapi.com", //51
"https://api.vidu.cn", //52
"https://llm.submodel.ai", //53
"https://ark.cn-beijing.volces.com", //54
}
1 change: 1 addition & 0 deletions constant/endpoint_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const (
EndpointTypeGemini EndpointType = "gemini"
EndpointTypeJinaRerank EndpointType = "jina-rerank"
EndpointTypeImageGeneration EndpointType = "image-generation"
EndpointTypeEmbeddings EndpointType = "embeddings"
//EndpointTypeMidjourney EndpointType = "midjourney-proxy"
//EndpointTypeSuno EndpointType = "suno-proxy"
//EndpointTypeKling EndpointType = "kling"
Expand Down
Loading