Compare commits

...

4 Commits

4 changed files with 10 additions and 6 deletions

View File

@@ -70,8 +70,9 @@ func (c *ClaudeMediaMessage) ParseMediaContent() []ClaudeMediaMessage {
type ClaudeMessageSource struct {
Type string `json:"type"`
MediaType string `json:"media_type"`
Data any `json:"data"`
MediaType string `json:"media_type,omitempty"`
Data any `json:"data,omitempty"`
Url string `json:"url,omitempty"`
}
type ClaudeMessage struct {

View File

@@ -203,10 +203,13 @@ const SystemSetting = () => {
const submitWorker = async () => {
let WorkerUrl = removeTrailingSlash(inputs.WorkerUrl);
await updateOptions([
const options = [
{ key: 'WorkerUrl', value: WorkerUrl },
{ key: 'WorkerValidKey', value: inputs.WorkerValidKey },
]);
]
if (inputs.WorkerValidKey !== '' || WorkerUrl === '') {
options.push({ key: 'WorkerValidKey', value: inputs.WorkerValidKey });
}
await updateOptions(options);
};
const submitPayAddress = async () => {

View File

@@ -143,6 +143,7 @@ export function openPage(url) {
}
export function removeTrailingSlash(url) {
if (!url) return '';
if (url.endsWith('/')) {
return url.slice(0, -1);
} else {

View File

@@ -157,7 +157,6 @@ export default function SettingGeminiModel(props) {
<Text>
{t(
"和Claude不同默认情况下Gemini的思考模型会自动决定要不要思考就算不开启适配模型也可以正常使用" +
"-nothinking后缀BudgetTokens=0思考关闭也会返回少量的思考token这是gemini的特性" +
"如果您需要计费,推荐设置无后缀模型价格按思考价格设置"
)}
</Text>