Skip to content

Add Azure support for embeddings endpoint #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 486 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
486 commits
Select commit Hold shift + click to select a range
a80a859
💻 Code: Add log display for model not found.
yym68686 Nov 5, 2024
d1ebf23
📖 Bump version to 0.0.74
github-actions[bot] Nov 5, 2024
3e31cf5
🐛 Bug: Fix the bug where the maxDuration in the Vercel configuration …
yym68686 Nov 5, 2024
a3a7635
💻 Code: Remove the maxDuration field from the vercel configuration file.
yym68686 Nov 5, 2024
1778d52
📖 Docs: Update documentation
yym68686 Nov 5, 2024
cdf3ed9
✨ Feature: Add feature: support setting rate limit for each model ind…
yym68686 Nov 5, 2024
8067d72
📖 Bump version to 0.0.75
github-actions[bot] Nov 5, 2024
c8dbefd
📖 Docs: Update documentation
yym68686 Nov 5, 2024
4e9c49c
🐛 Bug: Fix the bug where API initialization throws an error when no A…
yym68686 Nov 5, 2024
26c50ad
📖 Bump version to 0.0.76
github-actions[bot] Nov 5, 2024
11f264c
🐛 Bug: Fix the issue where an error is returned directly when Authori…
yym68686 Nov 5, 2024
ec11ef5
📖 Bump version to 0.0.77
github-actions[bot] Nov 5, 2024
cd90ffd
🐛 Bug: Fix the bug where GitHub models cannot retrieve the model when…
yym68686 Nov 5, 2024
12a925d
📖 Bump version to 0.0.78
github-actions[bot] Nov 5, 2024
e031595
📖 Docs: Update documentation
yym68686 Nov 5, 2024
af636f7
🐛 Bug: Fix the bug of ZeroDivisionError when the API key does not exist.
yym68686 Nov 6, 2024
0b31e2e
📖 Bump version to 0.0.79
github-actions[bot] Nov 6, 2024
9bde0e5
🐛 Bug: Fix the bug where the response body error returned by the erro…
yym68686 Nov 6, 2024
1b4cad3
📖 Bump version to 0.0.80
github-actions[bot] Nov 6, 2024
478e740
🐛 Bug: The bug where the provider's name, which is purely numeric, wa…
yym68686 Nov 7, 2024
b11023a
📖 Bump version to 0.0.81
github-actions[bot] Nov 7, 2024
a7303e8
🐛 Bug: Fix the bug where the embedding URL for GLM and GitHub models …
yym68686 Nov 7, 2024
1c49e1a
📖 Bump version to 0.0.82
github-actions[bot] Nov 7, 2024
ecf5650
✨ Feature: Add feature: Support that as long as the prefix of the API…
yym68686 Nov 7, 2024
4ed5703
📖 Bump version to 0.0.83
github-actions[bot] Nov 7, 2024
ebc2add
🐛 Bug: Fix the bug where the embedding model cannot receive arrays.
yym68686 Nov 7, 2024
fc9790b
📖 Bump version to 0.0.84
github-actions[bot] Nov 7, 2024
08f4342
💻 Code: Optimize log display: add error provider name display.
yym68686 Nov 7, 2024
a0d13b0
📖 Bump version to 0.0.85
github-actions[bot] Nov 7, 2024
d2272e8
🐛 Bug: Fix the bug of undefined review content.
yym68686 Nov 7, 2024
eeaa4ee
📖 Bump version to 0.0.86
github-actions[bot] Nov 7, 2024
926469d
✨ Feature: Add feature: support setting API key random load balancing
yym68686 Nov 7, 2024
7775638
📖 Bump version to 0.0.87
github-actions[bot] Nov 7, 2024
0a213f9
✨ Feature: Add feature: Support setting model timeout at the channel …
yym68686 Nov 7, 2024
825d319
📖 Bump version to 0.0.88
github-actions[bot] Nov 7, 2024
97c356d
📖 Docs: Update documentation
yym68686 Nov 7, 2024
3d5dc7e
🐛 Bug: Fix the bug where the 201 status code is mistakenly considered…
yym68686 Nov 8, 2024
d6768b9
📖 Bump version to 0.0.89
github-actions[bot] Nov 8, 2024
f67c99b
📖 Docs: Update documentation
yym68686 Nov 9, 2024
4fe51b7
🐛 Bug: Fix the bug where the global timeout configuration does not ta…
yym68686 Nov 9, 2024
974f096
📖 Bump version to 0.0.90
github-actions[bot] Nov 9, 2024
28f36b6
🐛 Bug: Fix the bug in the vertex API key concatenation syntax error.
yym68686 Nov 12, 2024
74089d7
📖 Bump version to 0.0.91
github-actions[bot] Nov 12, 2024
4e57426
🐛 Bug: Fix the bug where the response ID is the same every time.
yym68686 Nov 12, 2024
0f49d25
📖 Bump version to 0.0.92
github-actions[bot] Nov 12, 2024
6257666
🐛 Bug: Fix the bug where the response ID is the same every time.
yym68686 Nov 12, 2024
2bfe3df
📖 Bump version to 0.0.93
github-actions[bot] Nov 12, 2024
2f00898
🐛 Bug: Fix bugs caused by concurrent errors in multiple database writ…
yym68686 Nov 12, 2024
d0860ec
📖 Bump version to 0.0.94
github-actions[bot] Nov 12, 2024
1130ba9
🐛 Bug: Remove redundant error-catching code snippets
yym68686 Nov 13, 2024
09cfbba
📖 Bump version to 0.0.95
github-actions[bot] Nov 13, 2024
9871738
✨ Feature: Add feature: Support socks5 proxy
yym68686 Nov 13, 2024
58f793c
📖 Bump version to 0.0.96
github-actions[bot] Nov 13, 2024
ac2ca17
🐛 Bug: 1. Fix the bug where different base URLs use the same client.
yym68686 Nov 14, 2024
e13d491
📖 Bump version to 0.0.97
github-actions[bot] Nov 14, 2024
83b5b1b
🐛 Bug: Fix the bug of infinite loop error when there is only one weig…
yym68686 Nov 14, 2024
ae1a71e
📖 Bump version to 0.0.98
github-actions[bot] Nov 14, 2024
765297f
🐛 Bug: Fix the bug where using wildcard configuration for weights fai…
yym68686 Nov 16, 2024
d69517f
📖 Bump version to 0.0.99
github-actions[bot] Nov 16, 2024
cd5ba5b
📖 Docs: Update documentation
yym68686 Nov 16, 2024
6f7d288
🐛 Bug: Fix the bug where errors are not correctly returned when there…
yym68686 Nov 17, 2024
5962f8a
📖 Bump version to 0.0.100
github-actions[bot] Nov 17, 2024
483c524
✨ Feature: Add feature: Support for text-to-speech endpoint /v1/audio…
yym68686 Nov 17, 2024
607b9a8
📖 Bump version to 0.0.101
github-actions[bot] Nov 17, 2024
e995487
✨ Feature: Add feature: Support setting AUTO_RETRY to a number to cus…
yym68686 Nov 17, 2024
9892a5f
📖 Bump version to 0.0.102
github-actions[bot] Nov 17, 2024
25e0bb8
🐛 Bug: Fix the bug where request information cannot be stored in the …
yym68686 Nov 17, 2024
0e55435
📖 Bump version to 0.0.103
github-actions[bot] Nov 17, 2024
c23690b
🐛 Bug: Fix the bug where tokens cannot be calculated.
yym68686 Nov 17, 2024
88cac46
📖 Bump version to 0.0.104
github-actions[bot] Nov 17, 2024
da7c872
✨ Feature: Add feature: Support Gemini custom base URL
yym68686 Nov 18, 2024
88a12f8
📖 Bump version to 0.0.105
github-actions[bot] Nov 18, 2024
f79812f
🐛 Bug: 1. Fix the bug caused by the direct return of [DONE] in the AP…
yym68686 Nov 18, 2024
890c36e
📖 Bump version to 0.0.106
github-actions[bot] Nov 18, 2024
7e538de
🐛 Bug: Fix the bug where non-streaming response content is empty with…
yym68686 Nov 19, 2024
c38f266
📖 Bump version to 0.0.107
github-actions[bot] Nov 19, 2024
6a4ecbb
🐛 Bug: Fixing the bug where non-streaming response content is empty w…
yym68686 Nov 19, 2024
570d6ca
📖 Bump version to 0.0.108
github-actions[bot] Nov 19, 2024
e3ef29e
🐛 Bug: Fix the bug in Gemini v1 API that does not support system prom…
yym68686 Nov 21, 2024
ea7c5c1
📖 Bump version to 0.0.109
github-actions[bot] Nov 21, 2024
6d00cc2
💻 Code: Optimize log display, add version number log display.
yym68686 Nov 24, 2024
4c36719
📖 Bump version to 0.0.110
github-actions[bot] Nov 24, 2024
ee3ee1b
✨ Feature: Add feature: Add support for error triggers. When the mess…
yym68686 Nov 25, 2024
5f00224
📖 Bump version to 0.0.111
github-actions[bot] Nov 25, 2024
cc42a70
🐛 Bug: Fix the bug in the error_triggers condition judgment.
yym68686 Nov 25, 2024
89affc8
📖 Bump version to 0.0.112
github-actions[bot] Nov 25, 2024
8e3a5c1
✨ Feature: Add features to support setting different rate limits for …
yym68686 Nov 25, 2024
b2c7c58
📖 Bump version to 0.0.113
github-actions[bot] Nov 25, 2024
751e7be
📖 Docs: Update documentation
yym68686 Nov 25, 2024
db8226b
✨ Feature: Add feature: Support Vertex Gemini API to use the official…
yym68686 Nov 25, 2024
a7fa108
📖 Bump version to 0.0.114
github-actions[bot] Nov 25, 2024
6bc5b55
📖 Docs: Update documentation
yym68686 Nov 25, 2024
67e1a23
🐛 Bug: Fix the bug that the old rate limit code did not remove.
yym68686 Nov 25, 2024
deb4c46
📖 Bump version to 0.0.115
github-actions[bot] Nov 25, 2024
64c0556
✨ Feature: Add feature: Support API key attribute inheritance
yym68686 Nov 26, 2024
c5104a1
📖 Bump version to 0.0.116
github-actions[bot] Nov 26, 2024
96efe10
🐛 Bug: 1. Fix the bug of httpx timeout being too long after hot reloa…
yym68686 Nov 26, 2024
5137bbe
📖 Bump version to 0.0.117
github-actions[bot] Nov 26, 2024
e5641e4
🐛 Bug: Fix the bug where the channel is forcibly set to gpt when inhe…
yym68686 Nov 26, 2024
6114a04
📖 Bump version to 0.0.118
github-actions[bot] Nov 26, 2024
d5eb66c
🪞 Frontend: Add uni-api logo
yym68686 Nov 26, 2024
33c707c
📖 Bump version to 0.0.119
github-actions[bot] Nov 26, 2024
943e510
💻 Code: Remove redundant logo routing code
yym68686 Nov 26, 2024
7534fec
📖 Bump version to 0.0.120
github-actions[bot] Nov 26, 2024
5bec9fd
✨ Feature: 1. Support o1 model streaming output
yym68686 Nov 26, 2024
644ed2c
📖 Bump version to 0.0.121
github-actions[bot] Nov 26, 2024
98d7582
🐛 Bug: 1. Fix the bug where the OpenRouter channel cannot use image Q&A.
yym68686 Nov 27, 2024
afbea4f
📖 Bump version to 0.0.122
github-actions[bot] Nov 27, 2024
76396bf
🐛 Bug: Fix the bug where grok cannot read webp format images.
yym68686 Nov 27, 2024
d0addca
📖 Bump version to 0.0.123
github-actions[bot] Nov 27, 2024
c3f97d2
📖 Docs: Update documentation
yym68686 Nov 28, 2024
a13ac27
✨ Feature: Add feature: Support API key to use fixed priority schedul…
yym68686 Nov 29, 2024
c59c498
📖 Bump version to 0.0.124
github-actions[bot] Nov 29, 2024
4ce2a61
🐛 Bug:
yym68686 Nov 29, 2024
dbfe93f
📖 Bump version to 0.0.125
github-actions[bot] Nov 29, 2024
224c64c
🐛 Bug: Fix the bug where httpx-socks does not have a fixed version to…
yym68686 Nov 29, 2024
0d9915a
📖 Bump version to 0.0.126
github-actions[bot] Nov 29, 2024
2daaae3
🐛 Bug: Fix the bug where the GitHub o1 model cannot use streaming out…
yym68686 Dec 1, 2024
8e8a326
📖 Bump version to 0.0.127
github-actions[bot] Dec 1, 2024
905893b
🐛 Bug: Fix the bug that prevents OpenRouter from using images.
yym68686 Dec 1, 2024
a75a84a
📖 Bump version to 0.0.128
github-actions[bot] Dec 1, 2024
541d965
🐛 Bug: Fix the bug where no error is returned immediately when the AP…
yym68686 Dec 1, 2024
97bc62b
📖 Bump version to 0.0.129
github-actions[bot] Dec 1, 2024
24a1d96
🐛 Bug: Add feature: Support chatgpt-4o-latest automatic deletion of t…
yym68686 Dec 1, 2024
c06beec
📖 Bump version to 0.0.130
github-actions[bot] Dec 1, 2024
dfd5704
💻 Code: update openai UA
yym68686 Dec 2, 2024
c20bc2d
📖 Bump version to 0.0.131
github-actions[bot] Dec 2, 2024
ef93718
🐛 Bug: Fix the bug where the grok model does not automatically delete…
yym68686 Dec 2, 2024
db74559
📖 Bump version to 0.0.132
github-actions[bot] Dec 2, 2024
4bc2290
🐛 Bug: Fix the bug where the error string was not recognized as a fai…
yym68686 Dec 3, 2024
2b72824
📖 Bump version to 0.0.133
github-actions[bot] Dec 3, 2024
1967fff
🐛 Bug: Fix the bug where the DALL-E model cannot customize the respon…
yym68686 Dec 3, 2024
626f713
📖 Bump version to 0.0.134
github-actions[bot] Dec 3, 2024
a675cc9
🐛 Bug: Fix the bug where the Doubao model cannot use tools.
yym68686 Dec 3, 2024
d2ce8e8
📖 Bump version to 0.0.135
github-actions[bot] Dec 3, 2024
f5a26ec
🐛 Bug: Delete the code for the Doubao model to use the GPT channel.
yym68686 Dec 3, 2024
b530449
📖 Bump version to 0.0.136
github-actions[bot] Dec 3, 2024
ede1c03
🐛 Bug: Fix the bug where error strings cannot be captured correctly.
yym68686 Dec 3, 2024
89ab406
📖 Bump version to 0.0.137
github-actions[bot] Dec 3, 2024
c211d80
🐛 Bug: Fix image input bug in o1-mini model
yym68686 Dec 7, 2024
359accc
📖 Bump version to 0.0.138
github-actions[bot] Dec 7, 2024
a67f66c
🐛 Bug: Fix the bug where the Jina embedding model cannot be used.
yym68686 Dec 7, 2024
a4f3126
📖 Bump version to 0.0.139
github-actions[bot] Dec 7, 2024
9704359
🐛 Bug: Fix the bug that makes the learnlm model unusable.
yym68686 Dec 9, 2024
deea261
📖 Bump version to 0.0.140
github-actions[bot] Dec 9, 2024
5f0c2f2
🐛 Bug: Fix the bug where the Gemini API does not support the tool def…
yym68686 Dec 11, 2024
e96e3bf
📖 Bump version to 0.0.141
github-actions[bot] Dec 11, 2024
6226845
✨ Feature: Add feature: Add support for the built-in search tool of g…
yym68686 Dec 12, 2024
608830f
📖 Bump version to 0.0.142
github-actions[bot] Dec 12, 2024
fbaa40f
🐛 Bug: Fix the bug in the Gemini API where an empty message was not a…
yym68686 Dec 12, 2024
540f3c2
📖 Bump version to 0.0.143
github-actions[bot] Dec 12, 2024
c6061be
🐛 Bug: Fix the bug where the Gemini channel cannot use third-party pr…
yym68686 Dec 13, 2024
910c44a
📖 Bump version to 0.0.144
github-actions[bot] Dec 13, 2024
56e2b93
🐛 Bug: Try to fix vercel 500 error.
yym68686 Dec 14, 2024
ee65c13
📖 Bump version to 0.0.145
github-actions[bot] Dec 14, 2024
ace877f
🐛 Bug: Fix the bug of incomplete response_format parameter passing.
yym68686 Dec 16, 2024
f8a81c0
📖 Bump version to 0.0.146
github-actions[bot] Dec 16, 2024
38f6502
🐛 Bug: Fix the bug where streaming messages did not fully comply with…
yym68686 Dec 16, 2024
d6eb53b
📖 Bump version to 0.0.147
github-actions[bot] Dec 16, 2024
22a17e1
🐛 Bug: Fix the bug where the OpenRouter channel cannot use images.
yym68686 Dec 18, 2024
3753488
📖 Bump version to 0.0.148
github-actions[bot] Dec 18, 2024
a637729
🐛 Bug: Fix the bug where new-api is mistakenly identified as an error…
yym68686 Dec 20, 2024
0c42621
📖 Bump version to 0.0.149
github-actions[bot] Dec 20, 2024
387d954
🐛 Bug: Fix the bug where there is no spacing between the thinking tex…
yym68686 Dec 20, 2024
a7549cf
📖 Bump version to 0.0.150
github-actions[bot] Dec 20, 2024
b0d3e77
🐛 Bug: Fix the bug where the model_timeout value causes an error when…
yym68686 Dec 23, 2024
0d743fb
📖 Bump version to 0.0.151
github-actions[bot] Dec 23, 2024
82580df
✨ Feature: Add feature: Support gemini-2.0-flash-thinking model to ad…
yym68686 Dec 25, 2024
a0e48a2
📖 Bump version to 0.0.152
github-actions[bot] Dec 25, 2024
d39a1fd
🐛 Bug: Fix the bug in the Gemini API where the response_format field …
yym68686 Jan 5, 2025
aca4e17
📖 Bump version to 0.0.153
github-actions[bot] Jan 5, 2025
9dc798a
💻 Code: Remove invalid base URL
yym68686 Jan 5, 2025
db86407
📖 Bump version to 1.0.1
github-actions[bot] Jan 5, 2025
62c2ecd
🐛 Bug: Fix the bug of duplicate answers in Gemini search
yym68686 Jan 8, 2025
4505dec
📖 Bump version to 1.0.2
github-actions[bot] Jan 8, 2025
de53499
🐛 Bug: Fix the bug where o1-mini and o1-preview cannot use system mes…
yym68686 Jan 8, 2025
de6b540
📖 Bump version to 1.0.3
github-actions[bot] Jan 8, 2025
f39ed57
🐛 Bug: Fix the bug that prevents the vertex API gemini experimental m…
yym68686 Jan 9, 2025
964eda0
📖 Bump version to 1.0.4
github-actions[bot] Jan 9, 2025
7b5bbbe
🐛 Bug: Fix the bug in the o1 model message length calculation.
yym68686 Jan 9, 2025
6ccab9a
📖 Bump version to 1.0.5
github-actions[bot] Jan 9, 2025
04ac888
💻 Code: Add custom port environment variable
yym68686 Jan 10, 2025
432b109
💻 Code: Add custom port environment variable
yym68686 Jan 10, 2025
a3fc41e
📖 Bump version to 1.0.6
github-actions[bot] Jan 10, 2025
f216a0c
📖 Docs: Update documentation
yym68686 Jan 10, 2025
f451cff
✨ Feature: Completely shut down Gemini content review.
yym68686 Jan 11, 2025
d8ceff2
📖 Bump version to 1.0.7
github-actions[bot] Jan 11, 2025
de66b72
🐛 Bug: Fix the bug where the security settings cannot be closed in ge…
yym68686 Jan 11, 2025
acf1a00
📖 Bump version to 1.0.8
github-actions[bot] Jan 11, 2025
cedf281
📖 Docs: Update documentation
yym68686 Jan 12, 2025
2332b59
📖 Docs: Update documentation
yym68686 Jan 12, 2025
994a6e2
🐛 Bug: Fix the bug where Vertex Gemini cannot use search.
yym68686 Jan 14, 2025
50b9163
📖 Bump version to 1.0.9
github-actions[bot] Jan 14, 2025
ae5eefe
✨ Update Function model: Set default value for description field
yym68686 Jan 15, 2025
104191e
📖 Bump version to 1.0.10
github-actions[bot] Jan 15, 2025
91e63de
📦 Bump version to 1.1.0 and set default value for 'required' field in…
yym68686 Jan 16, 2025
51466ab
📖 Bump version to 1.1.1
github-actions[bot] Jan 16, 2025
70ed3a4
✨ Enhance Tool model: Add model_dump method to conditionally exclude …
yym68686 Jan 16, 2025
483c528
📖 Bump version to 1.1.2
github-actions[bot] Jan 16, 2025
b9b5443
✨ Update search tool integration in get_vertex_gemini_payload: stream…
yym68686 Jan 16, 2025
6ddb56f
📖 Bump version to 1.1.3
github-actions[bot] Jan 16, 2025
fee59cd
✨ Add JSON parsing method to Tool model and update example usage in m…
yym68686 Jan 16, 2025
02c48a1
📖 Bump version to 1.1.4
github-actions[bot] Jan 16, 2025
5e0dec9
✨ Refactor model_dump method in Tool and RequestModel classes: remove…
yym68686 Jan 16, 2025
5f495f1
📖 Bump version to 1.1.5
github-actions[bot] Jan 16, 2025
f9fe744
✨ Update endpoint handling in process_request function: allow 'stable…
yym68686 Jan 16, 2025
eed99a3
📖 Bump version to 1.1.6
github-actions[bot] Jan 16, 2025
680e8e4
✨ Update engine assignment logic in process_request function: streaml…
yym68686 Jan 16, 2025
d24f6a9
📖 Bump version to 1.1.7
github-actions[bot] Jan 16, 2025
07b827d
✨ Enhance model selection logic in process_request function: include …
yym68686 Jan 19, 2025
346eb0e
📖 Bump version to 1.1.8
github-actions[bot] Jan 19, 2025
74a0abd
✨ Refactor get_gemini_payload function: streamline generation configu…
yym68686 Jan 19, 2025
b2ef86f
📖 Bump version to 1.1.9
github-actions[bot] Jan 19, 2025
ac3a65c
✨ Refactor get_vertex_gemini_payload function: remove direct generati…
yym68686 Jan 19, 2025
d086aaf
📖 Bump version to 1.1.10
github-actions[bot] Jan 19, 2025
70ae8d3
✨ Update generation configuration handling in get_gemini_payload and …
yym68686 Jan 19, 2025
206bb46
📖 Bump version to 1.2.1
github-actions[bot] Jan 19, 2025
3450f22
✨ Refactor fetch_gemini_response_stream function: comment out unused …
yym68686 Jan 22, 2025
02c1c3a
📖 Bump version to 1.2.2
github-actions[bot] Jan 22, 2025
8d73a5b
✨ Normalize original_model input in get_timeout_value function: conve…
yym68686 Jan 22, 2025
e768057
📖 Bump version to 1.2.3
github-actions[bot] Jan 22, 2025
34f1e5e
✨ Update model ownership in post_all_models function: change owned_by…
yym68686 Jan 23, 2025
8cfc2fb
📖 Bump version to 1.2.4
github-actions[bot] Jan 23, 2025
282778e
✨ Refactor image encoding in request.py: replace imghdr with a custom…
yym68686 Jan 23, 2025
68e757c
📖 Bump version to 1.2.5
github-actions[bot] Jan 23, 2025
81a66fd
Add Azure support for embeddings endpoint
sinsoul Jan 24, 2025
67de1dc
Update request.py
sinsoul Jan 24, 2025
0bf651a
✨ Enhance error handling in utils.py: add support for parsing nested …
yym68686 Jan 26, 2025
e07de17
📖 Bump version to 1.2.6
github-actions[bot] Jan 26, 2025
e101a6b
✨ Add reasoning effort configuration for O3-mini models
yym68686 Feb 1, 2025
1b165d5
📖 Bump version to 1.2.7
github-actions[bot] Feb 1, 2025
93e2902
🔧 Refactor Gemini payload generation: improve tool processing and add…
yym68686 Feb 1, 2025
c3e66c2
📖 Bump version to 1.2.8
github-actions[bot] Feb 1, 2025
1e2d9d0
✨ Enhance API request handling: add O3 model support and custom API k…
yym68686 Feb 1, 2025
bf21c5d
📖 Bump version to 1.2.9
github-actions[bot] Feb 1, 2025
c098e73
🐛 Bug: Fix the bug in the o3 request parameter error.
yym68686 Feb 2, 2025
546214c
📖 Bump version to 1.2.10
github-actions[bot] Feb 2, 2025
b31be3c
🐛 Fix: Remove temperature parameter from GPT payload
yym68686 Feb 3, 2025
90a877e
📖 Bump version to 1.2.11
github-actions[bot] Feb 3, 2025
63cb700
🐛 Fix: Remove temperature for O3-mini and O1 models
yym68686 Feb 4, 2025
8dbb944
📖 Bump version to 1.2.12
github-actions[bot] Feb 4, 2025
1764a88
🐛 Fix: Prevent auto-retry for 413 Payload Too Large errors
yym68686 Feb 6, 2025
f7e8c6d
📖 Bump version to 1.2.13
github-actions[bot] Feb 6, 2025
365309a
✨ Enhance timeout calculation for multi-provider requests
yym68686 Feb 7, 2025
56f45be
📖 Bump version to 1.2.14
github-actions[bot] Feb 7, 2025
04170c7
✨ Refactor engine detection logic into a separate utility function
yym68686 Feb 7, 2025
b62393e
📖 Bump version to 1.2.15
github-actions[bot] Feb 7, 2025
931b39f
✨ Add Claude engine support in response handling
yym68686 Feb 7, 2025
5b8cea5
📖 Bump version to 1.3.1
github-actions[bot] Feb 7, 2025
7767727
Merge branch 'yym68686:main' into main
sinsoul Feb 9, 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
6 changes: 5 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
api.yaml
test
json_str
json_str
*.jpg
*.json
*.png
*.db
42 changes: 41 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
paths:
- VERSION
- main.py
- utils.py
- models.py
Expand All @@ -15,6 +16,7 @@ on:
- requirements.txt
- docker-compose.yml
- .github/workflows/main.yml
workflow_dispatch:

jobs:
build-and-push:
Expand All @@ -36,11 +38,49 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PACK_TOKEN }}

- name: Get current version
id: get_version
run: |
VERSION=$(cat VERSION || echo "0.0.0")
echo "Current version: $VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Bump version
id: bump_version
run: |
IFS='.' read -ra VERSION_PARTS <<< "${{ steps.get_version.outputs.version }}"
PATCH=$((VERSION_PARTS[2] + 1))
NEW_VERSION="${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.$PATCH"
echo $NEW_VERSION > VERSION
echo "New version: $NEW_VERSION"
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT

- name: Commit version bump
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add VERSION
git commit -m "📖 Bump version to ${{ steps.bump_version.outputs.new_version }}"
git push

- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: yym68686/uni-api:latest
tags: |
yym68686/uni-api:latest
yym68686/uni-api:${{ steps.bump_version.outputs.new_version }}
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ steps.bump_version.outputs.new_version }}
69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build and Release PEX

on:
push:
tags:
- 'v*'

jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux
arch: x86_64
- os: macos-latest
platform: macos
arch: arm64

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10.12'

- name: Install pex
run: pip install pex

- name: Install dependencies
run: pip install -r requirements.txt

- name: Get Version
id: get_version
run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV

- name: Build Linux PEX
if: matrix.platform == 'linux'
run: |
pex -D . -r requirements.txt \
-c uvicorn \
--inject-args 'main:app --host 0.0.0.0 --port 8000' \
--platform linux_x86_64-cp-3.10.12-cp310 \
--interpreter-constraint '==3.10.*' \
--no-strip-pex-env \
-o uni-api-linux-x86_64-${VERSION}.pex

- name: Build MacOS PEX
if: matrix.platform == 'macos'
run: |
pex -r requirements.txt \
-c uvicorn \
--inject-args 'main:app --host 0.0.0.0 --port 8000' \
-o uni-api-macos-arm64-${VERSION}.pex

- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ env.VERSION }}
draft: false
prerelease: false
files: |
uni-api-${{ matrix.platform }}-${{ matrix.arch }}-${{ env.VERSION }}.pex
37 changes: 37 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Sync Fork

on:
schedule:
- cron: '0 0 * * *' # 每天凌晨执行
# - cron: '0 */12 * * *' # 每12小时执行一次
workflow_dispatch: # 支持手动触发

jobs:
sync:
runs-on: ubuntu-latest
if: github.repository != 'yym68686/uni-api'

steps:
- name: Checkout target repo
uses: actions/[email protected]
with:
fetch-depth: 0 # 获取所有历史记录,以确保正确同步
token: ${{ secrets.PAT }} # 使用PAT替代GITHUB_TOKEN

- name: Sync Fork
uses: aormsby/[email protected]
with:
target_repo_token: ${{ secrets.PAT }}
upstream_sync_repo: yym68686/uni-api
upstream_sync_branch: main
target_sync_branch: main
upstream_pull_args: --allow-unrelated-histories --no-edit --strategy-option theirs
test_mode: false

- name: Check for new commits
if: steps.sync.outputs.has_new_commits == 'true'
run: echo "新的提交已同步。"

- name: No new commits
if: steps.sync.outputs.has_new_commits == 'false'
run: echo "没有新的提交需要同步。"
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
api.json
api.yaml
*.yaml
.env
__pycache__
.vscode
node_modules
.wrangler
.pytest_cache
.pytest_cache
*.jpg
*.json
!vercel.json
# *.png
*.db
.aider*
.idea
docker-compose-test.yml
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ EXPOSE 8000
WORKDIR /home
COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
COPY . /home
ENTRYPOINT ["python", "-u", "/home/main.py"]
ENV WATCHFILES_FORCE_POLLING=true
ENTRYPOINT ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--reload", "--reload-include", "*.yaml"]
Loading