Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Knowledge - Notion - When synced files get deleted from notion, they continue to be present in the agent's knowledge files. #199

Closed
sangee2004 opened this issue Oct 15, 2024 · 1 comment
Assignees
Labels
bug Something isn't working knowledge

Comments

@sangee2004
Copy link

sangee2004 commented Oct 15, 2024

Steps to reproduce the problem:

  1. Create an Agent with knowledge files from notion
  2. Once the selected files have been ingested successfully, delete one of the synced files from Notion UI.
  3. Use "Sync Files" option.

Notice that even after sync is completed successfully , we still see the delete file still being present in the knowledge file list.
I am also able to get chat and get responses relating to the knowledge file.

Expected Behavior:
Deleted files should be deleted from knowledge files on sync.

Errors seen in the server logs when syncing:

INFO[1020] Handling request: method POST, path /run      id=3aef267a-186c-4f7c-aafc-6312ada83364
ERRO[1020] sql query error                               affected=0 caller="/Users/sangeethahariharan/go/pkg/mod/github.com/acorn-io/[email protected]/pkg/db/db.go:686" elapsed="119.958µs" error="UNIQUE constraint failed: thread.previous" sql="INSERT INTO `thread` (`kind`,`version`,`api_group`,`name`,`namespace`,`uid`,`generation`,`previous`,`create`,`created`,`updated`,`deleted`,`removed`,`garbage`,`latest`,`metadata`,`data`,`status`,`partition_id`) VALUES (\"Thread\",\"v1\",\"otto.gptscript.ai\",\"t1b52vg\",\"default\",\"749f70c8-47f4-479f-af3a-788e7efe443e\",1,1685,false,\"2024-10-16 11:24:23.698\",\"2024-10-16 11:24:23.733\",NULL,NULL,false,true,\"{\"\"generateName\"\":\"\"t1\"\",\"\"managedFields\"\":[{\"\"apiVersion\"\":\"\"otto.gptscript.ai/v1\"\",\"\"fieldsType\"\":\"\"FieldsV1\"\",\"\"fieldsV1\"\":{\"\"f:metadata\"\":{\"\"f:generateName\"\":{}},\"\"f:spec\"\":{\"\"f:remoteKnowledgeSourceName\"\":{},\"\"f:workspaceID\"\":{}}},\"\"manager\"\":\"\"otto\"\",\"\"operation\"\":\"\"Update\"\",\"\"time\"\":\"\"2024-10-16T18:24:23Z\"\"}]}\",\"{\"\"spec\"\":{\"\"manifest\"\":{},\"\"remoteKnowledgeSourceName\"\":\"\"rks1sd6jx\"\",\"\"workspaceID\"\":\"\"directory:///Users/sangeethahariharan/Library/Application Support/otto/workspaces/5cd2aa7a-5b40-4ee0-a81d-f81c055bca90\"\"}}\",\"{\"\"knowledgeSetNames\"\":[\"\"ks1bf7fw\"\"]}\",\"\") RETURNING `id`"
@notionhq/client warn: request fail {
  code: 'object_not_found',
  message: 'Could not find block with ID: 121b081d-a8af-80cc-8312-ff16a055141f. Make sure the relevant pages and databases are shared with your integration.'
}
APIResponseError: Could not find block with ID: 121b081d-a8af-80cc-8312-ff16a055141f. Make sure the relevant pages and databases are shared with your integration.
    at buildRequestError (/Users/sangeethahariharan/Library/Caches/gptscript/repos/cd5fee69c2f7eb25246c622da51314736f832f09/knowledge/data-sources/notion/tool.gpt/node20/knowledge/data-sources/notion/node_modules/@notionhq/client/src/errors.ts:240:12)
    at Client.request (/Users/sangeethahariharan/Library/Caches/gptscript/repos/cd5fee69c2f7eb25246c622da51314736f832f09/knowledge/data-sources/notion/tool.gpt/node20/knowledge/data-sources/notion/node_modules/@notionhq/client/src/Client.ts:184:32)
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'object_not_found',
  status: 404,
  headers: Headers {
    [Symbol(map)]: [Object: null prototype] {
      date: [Array],
      'content-type': [Array],
      'transfer-encoding': [Array],
      connection: [Array],
      'cf-ray': [Array],
      'cf-cache-status': [Array],
      etag: [Array],
      'strict-transport-security': [Array],
      vary: [Array],
      'content-security-policy': [Array],
      'referrer-policy': [Array],
      'x-content-type-options': [Array],
      'x-dns-prefetch-control': [Array],
      'x-download-options': [Array],
      'x-frame-options': [Array],
      'x-notion-request-id': [Array],
      'x-permitted-cross-domain-policies': [Array],
      'x-xss-protection': [Array],
      'set-cookie': [Array],
      server: [Array],
      'content-encoding': [Array]
    }
  },
  body: '{"object":"error","status":404,"code":"object_not_found","message":"Could not find block with ID: 121b081d-a8af-80cc-8312-ff16a055141f. Make sure the relevant pages and databases are shared with your integration.","request_id":"1ac7a9ce-38ad-4ecc-b577-17c4dce9ea83"}'
}
@sangee2004 sangee2004 added bug Something isn't working knowledge labels Oct 15, 2024
@thedadams thedadams assigned thedadams and StrongMonkey and unassigned thedadams Oct 16, 2024
@StrongMonkey StrongMonkey mentioned this issue Oct 21, 2024
@sangee2004
Copy link
Author

This issue is not see anymore when testing with latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working knowledge
Projects
None yet
Development

No branches or pull requests

3 participants