mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 04:26:30 +08:00
chore: replace Chinese/Japanese comments with English translations
This commit is contained in:
parent
00dab7ca5f
commit
d986659add
@ -289,7 +289,8 @@ class OracleVector(BaseVector):
|
|||||||
words = pseg.cut(query)
|
words = pseg.cut(query)
|
||||||
current_entity = ""
|
current_entity = ""
|
||||||
for word, pos in words:
|
for word, pos in words:
|
||||||
if pos in {"nr", "Ng", "eng", "nz", "n", "ORG", "v"}: # nr: 人名,ns: 地名,nt: 机构名
|
# nr: person name, ns: place name, nt: organization name
|
||||||
|
if pos in {"nr", "Ng", "eng", "nz", "n", "ORG", "v"}:
|
||||||
current_entity += word
|
current_entity += word
|
||||||
else:
|
else:
|
||||||
if current_entity:
|
if current_entity:
|
||||||
|
|||||||
@ -213,7 +213,7 @@ class VastbaseVector(BaseVector):
|
|||||||
|
|
||||||
with self._get_cursor() as cur:
|
with self._get_cursor() as cur:
|
||||||
cur.execute(SQL_CREATE_TABLE.format(table_name=self.table_name, dimension=dimension))
|
cur.execute(SQL_CREATE_TABLE.format(table_name=self.table_name, dimension=dimension))
|
||||||
# Vastbase 支持的向量维度取值范围为 [1,16000]
|
# Vastbase supports vector dimensions in range [1, 16000]
|
||||||
if dimension <= 16000:
|
if dimension <= 16000:
|
||||||
cur.execute(SQL_CREATE_INDEX.format(table_name=self.table_name))
|
cur.execute(SQL_CREATE_INDEX.format(table_name=self.table_name))
|
||||||
redis_client.set(collection_exist_cache_key, 1, ex=3600)
|
redis_client.set(collection_exist_cache_key, 1, ex=3600)
|
||||||
|
|||||||
@ -49,7 +49,7 @@ const HitTestingPage: FC<Props> = ({ datasetId }: Props) => {
|
|||||||
const media = useBreakpoints()
|
const media = useBreakpoints()
|
||||||
const isMobile = media === MediaType.mobile
|
const isMobile = media === MediaType.mobile
|
||||||
|
|
||||||
const [hitResult, setHitResult] = useState<HitTestingResponse | undefined>() // 初始化记录为空数组
|
const [hitResult, setHitResult] = useState<HitTestingResponse | undefined>() // Initialize records as empty array
|
||||||
const [externalHitResult, setExternalHitResult] = useState<ExternalKnowledgeBaseHitTestingResponse | undefined>()
|
const [externalHitResult, setExternalHitResult] = useState<ExternalKnowledgeBaseHitTestingResponse | undefined>()
|
||||||
const [submitLoading, setSubmitLoading] = useState(false)
|
const [submitLoading, setSubmitLoading] = useState(false)
|
||||||
const [text, setText] = useState('')
|
const [text, setText] = useState('')
|
||||||
|
|||||||
@ -31,7 +31,7 @@ export const extractReturnType = (code: string, language: CodeLanguage): OutputV
|
|||||||
if (returnIndex === -1)
|
if (returnIndex === -1)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
// return から始まる部分文字列を取得
|
// Extract substring starting from return statement
|
||||||
const codeAfterReturn = codeWithoutComments.slice(returnIndex)
|
const codeAfterReturn = codeWithoutComments.slice(returnIndex)
|
||||||
|
|
||||||
let bracketCount = 0
|
let bracketCount = 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user