更换newapi接口为greencloud

This commit is contained in:
Shu Guang 2025-04-19 23:39:05 +08:00
parent f6abb7a850
commit ed5dfcc7dc
3 changed files with 15 additions and 15 deletions

View File

@ -70,14 +70,14 @@ const CodeAnalysisPage: React.FC = () => {
} }
setLoading(true); setLoading(true);
try { try {
const response = await fetch('https://a1.aizex.me/v1/chat/completions', { const response = await fetch('http://62.106.70.89:3000/v1/chat/completions', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Authorization': 'Bearer sk-Bp4AtAw19a6lENrPUQeqfiS9KP46Z5A43j4QkNeX4NRnGKMU' 'Authorization': 'Bearer sk-1PBIyxIdJ42yyC11XRNqbEXYDt2eZRNVNbd8XxmKjnPXGh5S'
}, },
body: JSON.stringify({ body: JSON.stringify({
model: 'gpt-4o', model: 'deepseek-chat',
messages: [ messages: [
{ {
role: 'user', role: 'user',

View File

@ -119,14 +119,14 @@ const AnalysisCenter: React.FC = () => {
setLoading(true); setLoading(true);
try { try {
const response = await fetch('https://a1.aizex.me/v1/chat/completions', { const response = await fetch('http://62.106.70.89:3000/v1/chat/completions', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Authorization': 'Bearer sk-Bp4AtAw19a6lENrPUQeqfiS9KP46Z5A43j4QkNeX4NRnGKMU' 'Authorization': 'Bearer sk-1PBIyxIdJ42yyC11XRNqbEXYDt2eZRNVNbd8XxmKjnPXGh5S'
}, },
body: JSON.stringify({ body: JSON.stringify({
model: 'gpt-4o', model: 'deepseek-chat',
messages: [ messages: [
{ {
role: 'system', role: 'system',
@ -201,14 +201,14 @@ const AnalysisCenter: React.FC = () => {
textContent = jsonData.map(row => row.join('\t')).join('\n'); textContent = jsonData.map(row => row.join('\t')).join('\n');
} }
const response = await fetch('https://a1.aizex.me/v1/chat/completions', { const response = await fetch('http://62.106.70.89:3000/v1/chat/completions', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Authorization': 'Bearer sk-Bp4AtAw19a6lENrPUQeqfiS9KP46Z5A43j4QkNeX4NRnGKMU' 'Authorization': 'Bearer sk-1PBIyxIdJ42yyC11XRNqbEXYDt2eZRNVNbd8XxmKjnPXGh5S'
}, },
body: JSON.stringify({ body: JSON.stringify({
model: 'gpt-4o', model: 'deepseek-chat',
messages: [ messages: [
{ {
role: 'system', role: 'system',

View File

@ -98,14 +98,14 @@ const ReportPage: React.FC = () => {
const analyzeData = async (content: any) => { const analyzeData = async (content: any) => {
try { try {
const response = await fetch('https://a1.aizex.me/v1/chat/completions', { const response = await fetch('http://62.106.70.89:3000/v1/chat/completions', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Authorization': 'Bearer sk-Bp4AtAw19a6lENrPUQeqfiS9KP46Z5A43j4QkNeX4NRnGKMU' 'Authorization': 'Bearer sk-1PBIyxIdJ42yyC11XRNqbEXYDt2eZRNVNbd8XxmKjnPXGh5S'
}, },
body: JSON.stringify({ body: JSON.stringify({
model: 'gpt-4o', model: 'deepseek-chat',
messages: [ messages: [
{ {
role: 'user', role: 'user',
@ -189,14 +189,14 @@ const handleDownload = async () => {
const generateReport = async () => { const generateReport = async () => {
setLoading(true); setLoading(true);
try { try {
const response = await fetch('https://a1.aizex.me/v1/chat/completions', { const response = await fetch('http://62.106.70.89:3000/v1/chat/completions', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Authorization': 'Bearer sk-Bp4AtAw19a6lENrPUQeqfiS9KP46Z5A43j4QkNeX4NRnGKMU' 'Authorization': 'Bearer sk-1PBIyxIdJ42yyC11XRNqbEXYDt2eZRNVNbd8XxmKjnPXGh5S'
}, },
body: JSON.stringify({ body: JSON.stringify({
model: 'gpt-4o', model: 'deepseek-chat',
messages: [ messages: [
{ {
role: 'user', role: 'user',