🚀 Auto-deploy: BrainWind atualizado em 15/07/2026 11:29:34
This commit is contained in:
@@ -26,7 +26,7 @@ const PROVIDERS: { value: string; label: string }[] = [
|
|||||||
const DEFAULT_MODELS: Record<string, string> = {
|
const DEFAULT_MODELS: Record<string, string> = {
|
||||||
openai: 'gpt-4o',
|
openai: 'gpt-4o',
|
||||||
anthropic: 'claude-3-5-sonnet-latest',
|
anthropic: 'claude-3-5-sonnet-latest',
|
||||||
minimax: 'minimax-m3.0',
|
minimax: 'MiniMax-M3',
|
||||||
openrouter: 'openai/gpt-4o',
|
openrouter: 'openai/gpt-4o',
|
||||||
ollama: 'deepseek-r1',
|
ollama: 'deepseek-r1',
|
||||||
};
|
};
|
||||||
@@ -167,7 +167,7 @@ export default function AuditPanel() {
|
|||||||
<Input
|
<Input
|
||||||
value={config.baseUrl ?? ''}
|
value={config.baseUrl ?? ''}
|
||||||
onChange={(e) => setConfig((c) => ({ ...c, baseUrl: e.target.value || undefined }))}
|
onChange={(e) => setConfig((c) => ({ ...c, baseUrl: e.target.value || undefined }))}
|
||||||
placeholder={config.provider === 'openrouter' ? 'https://openrouter.ai/api/v1 (padrão)' : config.provider === 'minimax' ? 'https://api.minimax.chat/v1 (padrão)' : config.provider === 'ollama' ? 'http://localhost:11434 (padrão)' : 'https://api.openai.com/v1'}
|
placeholder={config.provider === 'openrouter' ? 'https://openrouter.ai/api/v1 (padrão)' : config.provider === 'minimax' ? 'https://api.minimax.io/v1 (padrão)' : config.provider === 'ollama' ? 'http://localhost:11434 (padrão)' : 'https://api.openai.com/v1'}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -119,7 +119,10 @@ async function callMinimax(
|
|||||||
signal?: AbortSignal,
|
signal?: AbortSignal,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
onProgress?.('Enviando para MiniMax...');
|
onProgress?.('Enviando para MiniMax...');
|
||||||
const url = config.baseUrl || 'https://api.minimax.chat/v1/chat/completions';
|
let url = config.baseUrl || 'https://api.minimax.io/v1/chat/completions';
|
||||||
|
if (config.baseUrl && !config.baseUrl.includes('/chat/completions')) {
|
||||||
|
url = config.baseUrl.replace(/\/$/, '') + '/chat/completions';
|
||||||
|
}
|
||||||
const body = {
|
const body = {
|
||||||
model: config.model,
|
model: config.model,
|
||||||
messages: [
|
messages: [
|
||||||
@@ -152,7 +155,10 @@ async function callOpenRouter(
|
|||||||
signal?: AbortSignal,
|
signal?: AbortSignal,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
onProgress?.('Enviando para OpenRouter...');
|
onProgress?.('Enviando para OpenRouter...');
|
||||||
const url = config.baseUrl || 'https://openrouter.ai/api/v1/chat/completions';
|
let url = config.baseUrl || 'https://openrouter.ai/api/v1/chat/completions';
|
||||||
|
if (config.baseUrl && !config.baseUrl.includes('/chat/completions')) {
|
||||||
|
url = config.baseUrl.replace(/\/$/, '') + '/chat/completions';
|
||||||
|
}
|
||||||
const body = {
|
const body = {
|
||||||
model: config.model,
|
model: config.model,
|
||||||
messages: [
|
messages: [
|
||||||
|
|||||||
Reference in New Issue
Block a user