Laisky.Cai
bcd5cf3d5f
refactor: Refactor: Improve Anthropic event stream response handling
...
- Move `scanner.Split` instantiation to a new function
- Introduce a new regular expression to extract data from the response
- Utilize regular expressions to pre-process the event stream
2024-03-05 08:17:14 +00:00
Laisky.Cai
fdde066252
Refactor: Anthropic model response proto update
...
- Refactor content response
- Update channel adaptor to support `claude_model`
- Remove `null` stop reasons from content responses
- Add logging for error responses
- Change content start, ping, and message delta types to return true
- Set stop reason to end turn when response does not include a stop reason
- Set content response stop reason to null
- Add error handling for unmarshalling stream responses
- Rename `Completion` to `Text` in type definitions and `StopReason` to `Delta.StopReason`
- Count tokens in the `Delta.Text` field of the response instead of `Completion`
- Remove `Model` from the full text response
- Trim \r from incoming data
2024-03-05 05:05:57 +00:00
Laisky.Cai
c8713a0212
feat: SimplifyAnthropicRequest
...
- Remove `N` parameter from Anthropic request
- Append system messages from Claude to the `System` field instead of sending them as separate messages
2024-03-05 03:54:59 +00:00
Laisky.Cai
bb8755bc98
refactor: Refactor: Consolidate Anthropic model requests into GeneralOpenAIRequest
...
- Refactor Anthropic adapter to work with the new Anthropic API and model requests
- Remove the default value for `MaxTokensToSample`
- Set `MaxTokens` to 500 instead of 1000000
- Use `system` messages as the system prompt instead of the first message
2024-03-05 03:38:26 +00:00
Laisky.Cai
fb23ea0c9a
fix: Remove Anthropic channel
...
- Remove Discord Antropic Hackathon Announcement.
2024-03-05 01:20:27 +00:00
Laisky.Cai
003ec2eabc
fix: Switch default Adaptor from Anthropic to OpenAI
...
- Switch the default Adaptor from Anthropic to OpenAI
2024-03-05 01:15:52 +00:00
Laisky.Cai
b1a7e197b7
fix: Log request URL for non-ok status codes
...
- Refactor: Log full request URL in case of non-ok response
- Fix: URIScheme invalid model in proton-go
2024-03-05 01:08:44 +00:00
Laisky.Cai
cb6cb66646
Merge remote-tracking branch 'origin/upstream/main'
2024-03-05 01:02:35 +00:00
Laisky.Cai
f9df8eaa63
feat: Migrate to Anthropic Message API
...
- Migrate to Anthropic Message API
2024-03-05 00:58:52 +00:00
Laisky.Cai
75d2055e03
docs: Implement a function to get completion ratio
...
- Implement retrieval for the completion ratio of a given model
2024-03-04 02:54:44 +00:00
momomobinx
4fb22ad4ce
feat: support third part models of baidu ( #1046 )
...
百度千帆平台上的第三方大模型调用
2024-03-03 23:50:28 +08:00
JustSong
95cfb8e8c9
fix: using the first available model if default model is not found ( close #1021 )
2024-03-03 22:58:41 +08:00
JustSong
c6ace985c2
fix: set missing ali parameters ( close #1028 )
2024-03-03 22:51:01 +08:00
JustSong
10a926b8f3
feat: only use the top priority when first retry ( #1048 )
2024-03-03 22:16:34 +08:00
JustSong
2df877a352
feat: switch priority when retry ( close #1048 )
2024-03-03 22:14:07 +08:00
JustSong
9d8967f7d3
feat: support Mistral's models now ( close #1051 )
2024-03-03 21:46:45 +08:00
JustSong
b35f3523d3
feat: add gemini model alias ( close #1064 )
2024-03-03 21:03:04 +08:00
JustSong
82e916b5ff
fix: fix azure test ( close #1069 )
2024-03-03 20:51:28 +08:00
JustSong
de18d6fe16
refactor: refactor image relay ( close #1068 )
2024-03-03 19:30:11 +08:00
Laisky.Cai
359fc6aa18
fix: Hide free quota display for zero quotas
...
- Remove the quota display for Zero quotas
- Parse the `const quotaPerUnit` once
2024-03-02 02:09:01 +00:00
Laisky.Cai
5bdf577b0e
fix: Enhance logs table with sorting, quotas, and UI improvements
...
- Improve LogsTable functionality for admin users.
- Add quota calculation column.
- Display quotas in the summary header.
2024-03-02 01:17:03 +00:00
Laisky.Cai
a7c43ab248
fix: display issue for quota
...
- DRY up `LogsTable.js` codebase
- Fix formatting in `LogsTable.js`
- Display 'free' for a 0 quota instead of empty string
2024-03-02 01:10:59 +00:00
Laisky.Cai
268690219e
fix: Rename limit to cost and allow for 0 limit
...
- Rename `额度` column to `费用`
- Allow for a quota to be 0.
- If the quota is 0, return 'free'
2024-03-02 00:59:22 +00:00
JustSong
1d0b7fb5ae
feat: support chatglm-4 ( close #1045 , close #952 , close #952 , close #943 )
2024-03-02 03:05:25 +08:00
JustSong
f9490bb72e
fix: able to use updated default ratio
2024-03-02 01:32:04 +08:00
JustSong
76467285e8
docs: update readme
2024-03-02 01:25:21 +08:00
JustSong
df1fd9aa81
feat: support minimax's models now ( close #354 )
2024-03-02 01:24:28 +08:00
JustSong
614c2e0442
feat: support baichuan's models now ( close #1057 )
2024-03-02 00:55:48 +08:00
JustSong
eac6a0b9aa
fix: fix version is blank
2024-03-02 00:03:29 +08:00
Laisky.Cai
06350ae5a2
fix: Refactor: Remove Quota Consumption Logic When Quota is 0
...
- Remove quota consumption logic when quota is 0
- Improve logging of quota usage when quota is greater than 0
- Reduce noise in logs when quota is 0
2024-03-01 14:00:50 +00:00
Laisky.Cai
2989686ace
fix: Refactor: Migrate Distributor logging to ratio metrics
...
- Log a ratio for each channel in the context
- Initialize `minimalRatio` to -1 instead of 0
2024-03-01 13:55:21 +00:00
Laisky.Cai
dbe3930a8c
fix: Switch to channel-ratio
...
- Use channel ratios instead of group ratios in all applicable places
- Start using the lowest channel ratio of the specified channel's groups
2024-03-01 13:49:23 +00:00
Laisky.Cai
ba827b95e3
revert: Rework text model logic and update dependencies
...
- Rewrite model name for relay text
- Simplify logic and move logging statements
- Remove a check that filtered out models by model-mapping
- Remove abilities for the model mapping
- Lower numeric tolerance for test files
2024-03-01 02:14:32 +00:00
Laisky.Cai
c849292621
fix
2024-02-29 09:11:01 +00:00
Laisky.Cai
1a036d977e
Merge branch 'patch/model-mapping'
2024-02-29 09:05:13 +00:00
Laisky.Cai
90a039d325
fix : #1054 Add model mapping to abilities
...
- Update Abilities model to include model mapping key
- Parse model mapping in Channel model and filter models by model mapping in Update function
2024-02-29 09:04:04 +00:00
Laisky.Cai
6ee7281a0a
feat: Map channel model changes to ability mappings
...
Fix: Add model mappings to a channel's abilities
- Add model mappings to a channel's abilities.
- Add model mapping unit tests.
2024-02-29 06:55:55 +00:00
Laisky.Cai
3da0f62055
fix: Improve error handling and logging in channel update abilities
...
- Improve error handling in `UpdateAbilities()` method
- Log model name change request to the mapped model
2024-02-29 06:44:31 +00:00
Laisky.Cai
4625a0b97d
chore: Upgrade dependencies of GoWebProd
...
- Add GoWebProd libraries for UUID version 7, various utilities, xxHash calculation, sets, and more.
- Update various libraries for improved file system monitoring, deques, JSON handling, logging, stubbing, and comparison.
- Log supported models when initializing channel cache and remove duplicates.
2024-02-29 06:29:03 +00:00
Laisky.Cai
a94a3f5b36
Merge remote-tracking branch 'origin/upstream/main'
2024-02-27 01:09:14 +00:00
JustSong
b747cdbc6f
fix: fix getAndValidateTextRequest failed: unexpected end of JSON input ( close #1043 )
2024-02-26 22:52:16 +08:00
JustSong
6b27d6659a
fix: add role for ChatCompletionsStreamResponseChoice.Delta
2024-02-25 19:49:22 +08:00
JustSong
dc5b781191
fix: fix stream response id
2024-02-25 19:47:59 +08:00
JustSong
c880b4a9a3
fix: fix missing index in ChatCompletionsStreamResponseChoice ( #1037 )
2024-02-25 19:17:37 +08:00
JustSong
565ea58e68
feat: built in retry supported ( close #1036 , close #770 )
2024-02-25 19:01:49 +08:00
JustSong
f141a37a9e
fix: fix "error update user quota cache: Error 1040: Too many connections"
2024-02-25 16:58:14 +08:00
JustSong
5b78886ad3
fix: fix i18n
2024-02-25 16:53:46 +08:00
JustSong
87c7c4f0e6
fix: rm history build before building
2024-02-25 02:07:34 +08:00
JustSong
4c4a873890
fix: add an ending line for THEMES
2024-02-25 01:59:40 +08:00
JustSong
0664bdfda1
fix: fix build.sh ( close #1026 )
2024-02-25 01:53:27 +08:00