Skip to content

Commit

Permalink
fix: the site domain name in the Chat Bot API is hardcoded infiniflow…
Browse files Browse the repository at this point in the history
  • Loading branch information
cike8899 committed May 21, 2024
1 parent 250119e commit 81584d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions web/src/pages/chat/chat-overview-modal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import LineChart from '@/components/line-chart';
import { Domain } from '@/constants/common';
import { useSetModalState, useTranslate } from '@/hooks/commonHooks';
import { IModalProps } from '@/interfaces/common';
import { IDialog, IStats } from '@/interfaces/database/chat';
Expand Down Expand Up @@ -81,8 +80,7 @@ const ChatOverviewModal = ({
<Flex gap={8} vertical>
{t('serviceApiEndpoint')}
<Paragraph copyable className={styles.linkText}>
https://
{location.hostname === Domain ? Domain : '<YOUR_MACHINE_IP>'}
{location.origin}
/v1/api/
</Paragraph>
</Flex>
Expand Down
3 changes: 1 addition & 2 deletions web/src/pages/chat/embed-modal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import CopyToClipboard from '@/components/copy-to-clipboard';
import HightLightMarkdown from '@/components/highlight-markdown';
import { Domain } from '@/constants/common';
import { useTranslate } from '@/hooks/commonHooks';
import { IModalProps } from '@/interfaces/common';
import { Card, Modal, Tabs, TabsProps } from 'antd';
Expand All @@ -16,7 +15,7 @@ const EmbedModal = ({
const text = `
~~~ html
<iframe
src="https://${Domain}/chat/share?shared_id=${token}"
src="${location.origin}/chat/share?shared_id=${token}"
style="width: 100%; height: 100%; min-height: 600px"
frameborder="0"
>
Expand Down

0 comments on commit 81584d6

Please sign in to comment.