mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat(server): expose threshold (#12023)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
query matchWorkspaceDocs($contextId: String!, $content: String!, $limit: SafeInt) {
|
||||
query matchWorkspaceDocs($contextId: String!, $content: String!, $limit: SafeInt, $scopedThreshold: Float, $threshold: Float) {
|
||||
currentUser {
|
||||
copilot {
|
||||
contexts(contextId: $contextId) {
|
||||
matchWorkspaceDocs(content: $content, limit: $limit) {
|
||||
matchWorkspaceDocs(content: $content, limit: $limit, scopedThreshold: $scopedThreshold, threshold: $threshold) {
|
||||
docId
|
||||
chunk
|
||||
content
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
query matchFiles($contextId: String!, $content: String!, $limit: SafeInt) {
|
||||
query matchFiles($contextId: String!, $content: String!, $limit: SafeInt, $threshold: Float) {
|
||||
currentUser {
|
||||
copilot {
|
||||
contexts(contextId: $contextId) {
|
||||
matchFiles(content: $content, limit: $limit) {
|
||||
matchFiles(content: $content, limit: $limit, threshold: $threshold) {
|
||||
fileId
|
||||
chunk
|
||||
content
|
||||
|
||||
@@ -501,11 +501,16 @@ export const matchContextQuery = {
|
||||
export const matchWorkspaceDocsQuery = {
|
||||
id: 'matchWorkspaceDocsQuery' as const,
|
||||
op: 'matchWorkspaceDocs',
|
||||
query: `query matchWorkspaceDocs($contextId: String!, $content: String!, $limit: SafeInt) {
|
||||
query: `query matchWorkspaceDocs($contextId: String!, $content: String!, $limit: SafeInt, $scopedThreshold: Float, $threshold: Float) {
|
||||
currentUser {
|
||||
copilot {
|
||||
contexts(contextId: $contextId) {
|
||||
matchWorkspaceDocs(content: $content, limit: $limit) {
|
||||
matchWorkspaceDocs(
|
||||
content: $content
|
||||
limit: $limit
|
||||
scopedThreshold: $scopedThreshold
|
||||
threshold: $threshold
|
||||
) {
|
||||
docId
|
||||
chunk
|
||||
content
|
||||
@@ -520,11 +525,11 @@ export const matchWorkspaceDocsQuery = {
|
||||
export const matchFilesQuery = {
|
||||
id: 'matchFilesQuery' as const,
|
||||
op: 'matchFiles',
|
||||
query: `query matchFiles($contextId: String!, $content: String!, $limit: SafeInt) {
|
||||
query: `query matchFiles($contextId: String!, $content: String!, $limit: SafeInt, $threshold: Float) {
|
||||
currentUser {
|
||||
copilot {
|
||||
contexts(contextId: $contextId) {
|
||||
matchFiles(content: $content, limit: $limit) {
|
||||
matchFiles(content: $content, limit: $limit, threshold: $threshold) {
|
||||
fileId
|
||||
chunk
|
||||
content
|
||||
|
||||
@@ -3017,6 +3017,8 @@ export type MatchWorkspaceDocsQueryVariables = Exact<{
|
||||
contextId: Scalars['String']['input'];
|
||||
content: Scalars['String']['input'];
|
||||
limit?: InputMaybe<Scalars['SafeInt']['input']>;
|
||||
scopedThreshold?: InputMaybe<Scalars['Float']['input']>;
|
||||
threshold?: InputMaybe<Scalars['Float']['input']>;
|
||||
}>;
|
||||
|
||||
export type MatchWorkspaceDocsQuery = {
|
||||
@@ -3043,6 +3045,7 @@ export type MatchFilesQueryVariables = Exact<{
|
||||
contextId: Scalars['String']['input'];
|
||||
content: Scalars['String']['input'];
|
||||
limit?: InputMaybe<Scalars['SafeInt']['input']>;
|
||||
threshold?: InputMaybe<Scalars['Float']['input']>;
|
||||
}>;
|
||||
|
||||
export type MatchFilesQuery = {
|
||||
|
||||
Reference in New Issue
Block a user