-
Notifications
You must be signed in to change notification settings - Fork 3
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
✨AI to doc editor #250
base: main
Are you sure you want to change the base?
✨AI to doc editor #250
Conversation
4daa42c
to
01d279c
Compare
01d279c
to
57c7592
Compare
9a03ba9
to
40eea1f
Compare
bab5602
to
3ad1d32
Compare
We created a new endpoint to perform AI operations. POST /api/v1.0/ai/ with expected data: - text: str - action: str [prompt, correct, rephrase, summarize, translate_en, translate_de, translate_fr] Return JSON response with the processed text.
3ad1d32
to
c9ec14c
Compare
Add AI button to the editor toolbar. We can use AI to generate content with our editor. A list of predefined actions are available to use.
Add the ai setting to the environments.
c9ec14c
to
978d711
Compare
return None # No backoff required | ||
|
||
|
||
class AIUserRateThrottle(BaseThrottle): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you want to define a AIBaseThrottle
to prevent duplicated code here?
simple_metadata["actions"]["POST"]["language"] = { | ||
"choices": [ | ||
{"value": code, "display_name": name} | ||
for code, name in enums.ALL_LANGUAGES.items() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that true the AI can manage the same set of language as the ones available in the backend?
Purpose
Add AI actions to the doc editor:
We can quite easily add more actions.
Proposal
Demo
scrnli_9_23_2024_9-52-03.AM.webm