samlax12 commited on
Commit
16bcffd
·
verified ·
1 Parent(s): 52bc3ab

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +5 -5
templates/index.html CHANGED
@@ -1100,7 +1100,7 @@ function toggleKnowledgeSelection(element) {
1100
  // 加载知识库列表
1101
  async function loadKnowledgeBases() {
1102
  try {
1103
- const response = await fetch('https://samlax12-agent.hf.space/api/knowledge');
1104
  const result = await response.json();
1105
 
1106
  if (result.success) {
@@ -1244,7 +1244,7 @@ async function createKnowledgeBase(event) {
1244
  formData.append('file', fileInput.files[0]);
1245
 
1246
  try {
1247
- const response = await fetch('https://samlax12-agent.hf.space/api/knowledge', {
1248
  method: 'POST',
1249
  body: formData
1250
  });
@@ -1434,7 +1434,7 @@ async function generateAIWorkflow() {
1434
  `;
1435
 
1436
  try {
1437
- const response = await fetch('https://samlax12-agent.hf.space/api/agent/ai-assist', {
1438
  method: 'POST',
1439
  headers: { 'Content-Type': 'application/json' },
1440
  body: JSON.stringify({
@@ -1595,7 +1595,7 @@ async function createAgent() {
1595
  };
1596
 
1597
  try {
1598
- const response = await fetch('https://samlax12-agent.hf.space/api/agent/create', {
1599
  method: 'POST',
1600
  headers: { 'Content-Type': 'application/json' },
1601
  body: JSON.stringify(agentData)
@@ -1649,7 +1649,7 @@ async function createAgent() {
1649
  // 加载Agent列表
1650
  async function loadAgents() {
1651
  try {
1652
- const response = await fetch('https://samlax12-agent.hf.space/api/agent/list');
1653
  const result = await response.json();
1654
 
1655
  if (result.success) {
 
1100
  // 加载知识库列表
1101
  async function loadKnowledgeBases() {
1102
  try {
1103
+ const response = await fetch('/api/knowledge');
1104
  const result = await response.json();
1105
 
1106
  if (result.success) {
 
1244
  formData.append('file', fileInput.files[0]);
1245
 
1246
  try {
1247
+ const response = await fetch('/api/knowledge', {
1248
  method: 'POST',
1249
  body: formData
1250
  });
 
1434
  `;
1435
 
1436
  try {
1437
+ const response = await fetch('/api/agent/ai-assist', {
1438
  method: 'POST',
1439
  headers: { 'Content-Type': 'application/json' },
1440
  body: JSON.stringify({
 
1595
  };
1596
 
1597
  try {
1598
+ const response = await fetch('/api/agent/create', {
1599
  method: 'POST',
1600
  headers: { 'Content-Type': 'application/json' },
1601
  body: JSON.stringify(agentData)
 
1649
  // 加载Agent列表
1650
  async function loadAgents() {
1651
  try {
1652
+ const response = await fetch('/api/agent/list');
1653
  const result = await response.json();
1654
 
1655
  if (result.success) {