Skip to content

Commit

Permalink
feat: support query date tool (langgenius#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamjoel authored Jul 27, 2023
1 parent 2adacea commit d44d4bd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions web/app/components/app/chat/thought/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ const Thought: FC<IThoughtProps> = ({
return t('explore.universalChat.thought.res.google', { query: input.query })
case 'wikipedia':
return t('explore.universalChat.thought.res.wikipedia', { query: input.query })
case 'current_datetime':
return t('explore.universalChat.thought.res.date')
default:
return `Unknown tool: ${item.tool}`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ const Summary: FC<ISummaryProps> = ({
plugins,
dataSets,
}) => {
const pluginIds = Object.keys(plugins).filter(key => plugins[key])
// current_datetime is not configable and do not have icon
const pluginIds = Object.keys(plugins).filter(key => plugins[key] && key !== 'current_datetime')
const [isShowConfig, { setFalse: hideConfig, toggle: toggleShowConfig }] = useBoolean(false)
const configContentRef = React.useRef(null)

Expand Down
1 change: 1 addition & 0 deletions web/i18n/lang/explore.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const translation = {
google: 'Searching Google {{query}}',
wikipedia: 'Searching Wikipedia {{query}}',
dataset: 'Retrieving dataset {datasetName}',
date: 'Searching date',
},
},
viewConfigDetailTip: 'In conversation, cannot change above settings',
Expand Down
1 change: 1 addition & 0 deletions web/i18n/lang/explore.zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const translation = {
google: '搜索谷歌 {{query}}',
wikipedia: '搜索维基百科 {{query}}',
dataset: '检索数据集 {datasetName}',
date: '查询日期',
},
},
viewConfigDetailTip: '在对话中,无法更改上述设置',
Expand Down

0 comments on commit d44d4bd

Please sign in to comment.