Skip to content

Commit

Permalink
chore: rebase state
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Jul 19, 2024
2 parents c878071 + 2efef76 commit 3f46372
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ access/*.json
db
redis
config

# for opencommit
.env
2 changes: 1 addition & 1 deletion app/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "chatnio",
"version": "3.11.0"
"version": "3.11.2"
},
"tauri": {
"allowlist": {
Expand Down
2 changes: 2 additions & 0 deletions app/src/admin/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ export const ChannelInfos: Record<string, ChannelInfo> = {
"gpt-4-32k-0613",
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4o-mini",
"gpt-4o-mini-2024-07-18",
"dalle",
"dall-e-2",
"dall-e-3",
Expand Down
2 changes: 2 additions & 0 deletions app/src/admin/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export const modelColorMapper: Record<string, string> = {
"gpt-4-32k-0314": "purple-600",
"gpt-4o": "purple-600",
"gpt-4o-2024-05-13": "purple-600",
"gpt-4o-mini": "purple-600",
"gpt-4o-mini-2024-07-18": "purple-600",

"dall-e-3": "purple-700",

Expand Down
5 changes: 5 additions & 0 deletions app/src/admin/datasets/charge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ export const pricing: PricingDataset = [
input: 0.005,
output: 0.015,
},
{
models: ["gpt-4o-mini", "gpt-4o-mini-2024-07-18"],
input: 0.00015,
output: 0.0006,
},

{
models: ["gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613"],
Expand Down
2 changes: 1 addition & 1 deletion app/src/conf/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { syncSiteInfo } from "@/admin/api/info.ts";
import { setAxiosConfig } from "@/conf/api.ts";

export const version = "3.11.0"; // version of the current build
export const version = "3.11.1"; // version of the current build
export const dev: boolean = getDev(); // is in development mode (for debugging, in localhost origin)
export const deploy: boolean = true; // is production environment (for api endpoint)
export const tokenField = getTokenField(deploy); // token field name for storing token
Expand Down
8 changes: 3 additions & 5 deletions app/src/store/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import {
import { RootState } from "@/store/index.ts";
import { isMobile } from "@/utils/device";

export const sendKeys = isMobile()
? ["Ctrl + Enter", "Enter"]
: ["Enter", "Ctrl + Enter"];
export const sendKeys = ["Ctrl + Enter", "Enter"];
export const initialSettings = {
context: true,
align: false,
history: 8,
sender: isMobile(), // Defaults to true (Enter) in the case of mobile and false (Ctrl + Enter) on PCs
sender: !isMobile(), // default [mobile: Ctrl + Enter, pc: Enter]
max_tokens: 2000,
temperature: 0.6,
top_p: 1,
Expand All @@ -32,7 +30,7 @@ export const settingsSlice = createSlice({
context: getBooleanMemory("context", true), // keep context
align: getBooleanMemory("align", false), // chat textarea align center
history: getNumberMemory("history_context", 8), // max history context length
sender: getBooleanMemory("sender", false), // sender (false: Ctrl + Enter, true: Enter)
sender: getBooleanMemory("sender", !isMobile()), // sender (false: Ctrl + Enter, true: Enter)
max_tokens: getNumberMemory("max_tokens", 2000), // max tokens
temperature: getNumberMemory("temperature", 0.6), // temperature
top_p: getNumberMemory("top_p", 1), // top_p
Expand Down

0 comments on commit 3f46372

Please sign in to comment.