Commit Graph

102 Commits

Author SHA1 Message Date
akumatus 95cf2e047f feat(core): cite source documents in the AI answer (#9863)
Support issue [BS-2424](https://linear.app/affine-design/issue/BS-2424).

### What changed?
- Add relevant document prompt templates.
- Add citation rules in system prompts.
- Change message `params` type to `Record<string, any>`
- Add unit test.

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/ec24e664-039e-4fab-bd26-b3312f011daf.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/ec24e664-039e-4fab-bd26-b3312f011daf.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/ec24e664-039e-4fab-bd26-b3312f011daf.mov">录屏2025-01-23 10.40.38.mov</video>
2025-01-24 04:04:01 +00:00
akumatus 862a9d0bc4 feat: use footnote for perplexity search results (#9851)
Support issue [BS-2475](https://linear.app/affine-design/issue/BS-2475).

![截屏2025-01-22 16.49.25.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/49febcdf-e403-4a2e-ba99-da36df34e08c.png)
2025-01-22 10:54:01 +00:00
darkskygit 755cebfb18 chore(server): not allow to update action's prompt (#9615) 2025-01-09 10:18:53 +00:00
akumatus 58ce86533e feat(core): support ai network search (#9357)
### What Changed?
- Add `PerplexityProvider` in backend.
- Update session prompt name if user toggle network search mode in chat panel.
- Add experimental flag for AI network search feature.
- Add unit tests and e2e tests.

Search results are streamed and appear word for word:

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/56f6ec7b-4b21-405f-9612-43e083f6fb84.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/56f6ec7b-4b21-405f-9612-43e083f6fb84.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/56f6ec7b-4b21-405f-9612-43e083f6fb84.mov">录屏2024-12-27 18.58.40.mov</video>

Click the little globe icon to manually turn on/off Internet search:
<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/778f1406-bf29-498e-a90d-7dad813392d1.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/778f1406-bf29-498e-a90d-7dad813392d1.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/778f1406-bf29-498e-a90d-7dad813392d1.mov">录屏2024-12-27 19.01.16.mov</video>

When there is an image, it will automatically switch to the openai model:

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/56431d8e-75e1-4d84-ab4a-b6636042cc6a.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/56431d8e-75e1-4d84-ab4a-b6636042cc6a.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/56431d8e-75e1-4d84-ab4a-b6636042cc6a.mov">录屏2024-12-27 19.02.13.mov</video>
2025-01-09 04:00:59 +00:00
forehalo c0ed74dfed chore: standardize tsconfig (#9568) 2025-01-08 04:07:56 +00:00
darkskygit 5cc40114fc fix(server): unsplash path mapping (#9159) 2024-12-16 09:35:18 +00:00
Brooooooklyn aaaea8918f chore: upgrade to eslint9 (#9163) 2024-12-14 10:29:04 +00:00
forehalo 0e73737407 refactor(server): make redis required module (#9121) 2024-12-13 06:27:15 +00:00
forehalo 4c23991047 chore: rename fundamentals to base (#9119) 2024-12-13 06:27:13 +00:00
darkskygit 4d44bcc145 fix(server): image action behavior in ci (#9077) 2024-12-10 02:54:31 +00:00
Boshen c349a24e95 chore: upgrade oxlint to v0.13.2 (#8891)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-11-26 17:56:35 +08:00
darkskygit 2a3e81de3e fix: also check online model list if model not defined (#8726) 2024-11-08 05:07:45 +00:00
darkskygit 7a201984e9 feat(server): add real-world prompt test for copilot apis (#8629)
fix AF-1432, PD-1176
2024-11-01 07:05:12 +00:00
LongYinan c08b02caba Revert "feat: copilot frontend e2e (#7694)"
This reverts commit d71852789f.
2024-10-31 12:08:57 +08:00
darkskygit d71852789f feat: copilot frontend e2e (#7694) 2024-10-29 08:56:37 +00:00
darkskygit efee4dfd66 feat: use date fixed model name (#8621)
fix CLOUD-81
2024-10-29 07:31:23 +00:00
darkskygit 054c0ef9f1 feat: isolate user content (#8568)
fix AF-1513
2024-10-22 02:05:03 +00:00
darkskygit fa554b1054 feat: add copilot metrics (#8455)
fix CLOUD-73
2024-10-18 03:30:02 +00:00
DarkSky 075cedabf7 fix: message attachment merge (#8498) 2024-10-16 12:57:53 +08:00
darkskygit d0c9a7bf81 feat: separate user content from prompt (#8480) 2024-10-11 12:47:36 +00:00
darkskygit a9b29d24f1 feat: improve markdown formatting (#8398)
fix AF-1442
fix AF-1443
2024-09-26 09:47:53 +00:00
darkskygit ed8e4e30f0 fix: collect workflow's assistant content (#8373)
fix CLOUD-71
2024-09-24 12:35:48 +00:00
darkskygit 7bc28d7935 feat: add language hint for prompt (#8216)
fix PD-1708
2024-09-13 12:30:13 +00:00
darkskygit 41f9149be6 feat(server): support openai compatible stream api (#8065)
fix #8010
2024-09-03 09:25:00 +00:00
forehalo 8b0afd6eeb refactor(server): auth (#7994) 2024-09-03 09:03:39 +00:00
Don Isaac dbcfd24ed8 fix: remove unused variables (#7968) 2024-08-26 14:23:56 +08:00
forehalo e20bdbf925 feat(server): make server storage adapters (#7902) 2024-08-21 05:30:26 +00:00
forehalo 682a01e441 feat(server): make a singleton global mutex service (#7900) 2024-08-21 05:30:19 +00:00
forehalo 624f3514fc feat(server): make permission a standalone module (#7880) 2024-08-15 10:01:52 +00:00
darkskygit 339c39c1ec feat: improve prompt management (#7853) 2024-08-14 08:38:36 +00:00
JimmFly b214003968 feat(admin): add prompt management page (#7611)
close AF-907

Supports online modification of prompt, but does not support custom ai key yet

![CleanShot 2024-07-29 at 22 12 39@2x](https://github.com/user-attachments/assets/c67ad0d0-3e5b-44ff-b7db-d07dd11c19e2)
2024-08-13 14:51:54 +08:00
darkskygit 5872b884a5 fix: increase image limit of copilot (#7756)
fix AF-1080 AF-1154
2024-08-06 09:15:40 +00:00
darkskygit 0acc1bd9e8 chore: cleanup outdated model & upgrade model (#7739) 2024-08-05 10:13:33 +00:00
darkskygit 73a6723d15 fix: use correct user id in forked session (#7710) 2024-08-05 09:03:11 +00:00
darkskygit 3f0e4c04d7 feat: refector prompt refresh (#7605) 2024-07-26 04:51:07 +00:00
darkskygit 470262d400 feat: migrate fal workflow to server (#7581) 2024-07-26 04:04:39 +00:00
darkskygit 386d766597 fix: forked session query condition (#7568) 2024-07-22 12:28:05 +00:00
DarkSky dcb9d75db7 feat: allow sort and filter forked session (#7519) 2024-07-18 11:08:47 +08:00
darkskygit e4b816f153 feat: add ping for event source (#7493) 2024-07-15 04:16:22 +00:00
darkskygit 5f16cb400d hotfix: adapt new fal response (#7480) 2024-07-12 03:22:04 +00:00
darkskygit 0739e10683 feat: adapt workflow for ppt & minimap (#7464) 2024-07-10 10:13:17 +00:00
darkskygit 556956ced2 feat: update ppt prompt (#7446) 2024-07-08 08:11:31 +00:00
darkskygit bf6c9a5955 feat: add prompt level config (#7445) 2024-07-08 08:11:22 +00:00
darkskygit e8285289fe feat: improve histories query for forked session (#7414) 2024-07-03 04:49:19 +00:00
darkskygit 61870c04d0 feat: fork session support (#7367) 2024-07-03 03:10:09 +00:00
darkskygit aeb666f95e feat: integrate i18n error for copilot (#7311)
fix PD-1333 CLOUD-42
2024-06-26 13:36:23 +00:00
darkskygit cffaf815e1 feat: add more workflow executor (#7231) 2024-06-25 10:54:16 +00:00
darkskygit fe89ecb1d3 feat: workflow executor (#7159)
fix AFF-1221 AFF-1232
2024-06-25 08:40:47 +00:00
forehalo 7b3673ae82 chore: assign todos (#7297) 2024-06-21 07:54:14 +00:00
liuyi 54fc1197ad feat(server): introduce user friendly server errors (#7111) 2024-06-17 11:30:58 +08:00