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

feat: copilot client #6626

Merged
merged 1 commit into from
Mar 28, 2024
Merged

feat: copilot client #6626

merged 1 commit into from
Mar 28, 2024

Conversation

regischen
Copy link
Member

@regischen regischen commented Mar 28, 2024

Doc: https://app.affine.pro/workspace/af3478a2-9c9c-4d16-864d-bffa1eb10eb6/YFIow1zJM_zmIQaRcGHiz

Provide Client to communicate with AI backend for debugging. These code would be migrated into Affine side or removed.

Example

const copilotClient = new CopilotClient();
const sessionId = await copilotClient.createSession({
  workspaceId: 'starter',
  docId: '1',
  action: false,
  model: 'Gpt4TurboPreview',
  promptName: '',
});

await copilotClient.textToText('hello', sessionId);
await copilotClient.textToText('tell me a joke', sessionId);
await copilotClient.textToText('tell me another joke', sessionId);
await copilotClient.getAnonymousHistories('starter');

cc/ @Flrande @doouding

Copy link

graphite-app bot commented Mar 28, 2024

Your org has enabled the Graphite merge queue for merging into master

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

Copy link

vercel bot commented Mar 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 28, 2024 1:05pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Mar 28, 2024 1:05pm

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @regischen and the rest of your teammates on Graphite Graphite

Copy link

graphite-app bot commented Mar 28, 2024

Merge activity

Doc: https://app.affine.pro/workspace/af3478a2-9c9c-4d16-864d-bffa1eb10eb6/YFIow1zJM_zmIQaRcGHiz

Provide Client to communicate with AI backend for debugging. These code would be migrated into Affine side or removed.

Example
```ts
const copilotClient = new CopilotClient();
const sessionId = await copilotClient.createSession({
  workspaceId: 'starter',
  docId: '1',
  action: false,
  model: 'Gpt4TurboPreview',
  promptName: '',
});

await copilotClient.textToText('hello', sessionId);
await copilotClient.textToText('tell me a joke', sessionId);
await copilotClient.textToText('tell me another joke', sessionId);
await copilotClient.getAnonymousHistories('starter');
```

cc/ @Flrande  @doouding
@graphite-app graphite-app bot merged commit 8826c24 into master Mar 28, 2024
19 checks passed
@graphite-app graphite-app bot deleted the feat-copilot-client branch March 28, 2024 13:08
darkskygit pushed a commit to toeverything/AFFiNE that referenced this pull request Apr 10, 2024
## Features
- toeverything/blocksuite#6679 @pengx17
- toeverything/blocksuite#6620 @doouding
- toeverything/blocksuite#6602 @golok727
- toeverything/blocksuite#6661 @Flrande
- toeverything/blocksuite#6591 @fundon
- toeverything/blocksuite#6634 @golok727
- toeverything/blocksuite#6626 @regischen
- toeverything/blocksuite#6630 @Saul-Mirone
- toeverything/blocksuite#6605 @donteatfriedrice
- toeverything/blocksuite#6614 @zzj3720
- toeverything/blocksuite#6508 @doouding
- toeverything/blocksuite#6578 @donteatfriedrice
- toeverything/blocksuite#6572 @zzj3720
- toeverything/blocksuite#6571 @golok727
- toeverything/blocksuite#6573 @fundon
- toeverything/blocksuite#6580 @Flrande
- toeverything/blocksuite#6540 @golok727
- toeverything/blocksuite#6567 @Flrande
- toeverything/blocksuite#6565 @zzj3720
- toeverything/blocksuite#6561 @zzj3720

## Bugfix
- toeverything/blocksuite#6677 @donteatfriedrice
- toeverything/blocksuite#6681 @fundon
- toeverything/blocksuite#6673 @fundon
- toeverything/blocksuite#6652 @fundon
- toeverything/blocksuite#6641 @fourdim
- toeverything/blocksuite#6649 @golok727
- toeverything/blocksuite#6648 @doouding
- toeverything/blocksuite#6662 @Flrande
- toeverything/blocksuite#6659 @zkwolf
- toeverything/blocksuite#6644 @doouding
- toeverything/blocksuite#6633 @golok727
- toeverything/blocksuite#6632 @golok727
- toeverything/blocksuite#6622 @RubaXa
- toeverything/blocksuite#6622 @RubaXa
- toeverything/blocksuite#6622 @RubaXa
- toeverything/blocksuite#6622 @RubaXa
- toeverything/blocksuite#6622 @RubaXa
- toeverything/blocksuite#6600 @fourdim
- toeverything/blocksuite#6617 @zzj3720
- toeverything/blocksuite#6618 @Flrande
- toeverything/blocksuite#6576 @fundon
- toeverything/blocksuite#6595 @fundon
- toeverything/blocksuite#6596 @zzj3720
- toeverything/blocksuite#6574 @fundon
- toeverything/blocksuite#6593 @Saul-Mirone
- toeverything/blocksuite#6588 @zzj3720
- toeverything/blocksuite#6590 @zzj3720
- toeverything/blocksuite#6589 @zzj3720
- toeverything/blocksuite#6584 @lawvs
- toeverything/blocksuite#6579 @fundon
- toeverything/blocksuite#6538 @golok727
- toeverything/blocksuite#6570 @zzj3720
- toeverything/blocksuite#6569 @zzj3720
- toeverything/blocksuite#6564 @zzj3720
- toeverything/blocksuite#6563 @zzj3720

## Refactor
- toeverything/blocksuite#6683 @doodlewind
- toeverything/blocksuite#6668 @Flrande
- toeverything/blocksuite#6635 @donteatfriedrice
- toeverything/blocksuite#6653 @fundon
- toeverything/blocksuite#6615 @Flrande
- toeverything/blocksuite#6534 @Saul-Mirone
- toeverything/blocksuite#6553 @golok727

## Misc
- chore(examples): cleanup types
- toeverything/blocksuite#6664 @fourdim
- toeverything/blocksuite#6657 @fourdim
- toeverything/blocksuite#6654 @fourdim
- toeverything/blocksuite#6587 @Saul-Mirone
- toeverything/blocksuite#6562 @donteatfriedrice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants