-
Notifications
You must be signed in to change notification settings - Fork 326
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 Completions #5910
AI Completions #5910
Conversation
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.
QA needed. After QA is done, lets merge it and lets make some hype about it in our promo videos :D
app/gui/src/controller/searcher.rs
Outdated
// If there isn't any expression part, the pattern is the whole input. | ||
// If there isn't any expression part, the pattern is the whole input. |
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.
I believe this is an accidental change :)
const AI_STOP_SEQUENCE: &'static str = "`"; | ||
const AI_GOAL_PLACEHOLDER: &'static str = "__$$GOAL$$__"; | ||
|
||
async fn accept_ai_query( |
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.
I know this is PoC, but docs are needed here for future refactoring/development. Please describe shortly what this function does and why.
Ok(()) | ||
} | ||
|
||
fn handle_ai_query(&self, query: String) -> FallibleResult { |
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.
I know this is PoC, but docs are needed here for future refactoring/development. Please describe shortly what this function does and why.
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.
The engine part looks OK, but I'm guessing you might need to adapt it given recent changes
# Conflicts: # CHANGELOG.md # app/gui/src/controller/searcher.rs # engine/language-server/src/main/scala/org/enso/languageserver/boot/MainModule.scala # engine/language-server/src/main/scala/org/enso/languageserver/data/Config.scala # engine/language-server/src/test/scala/org/enso/languageserver/boot/resource/RepoInitializationSpec.scala # engine/language-server/src/test/scala/org/enso/languageserver/filemanager/ContentRootManagerSpec.scala # engine/language-server/src/test/scala/org/enso/languageserver/runtime/ContextEventsListenerSpec.scala # engine/language-server/src/test/scala/org/enso/languageserver/search/SuggestionsHandlerSpec.scala # engine/language-server/src/test/scala/org/enso/languageserver/websocket/binary/BaseBinaryServerTest.scala # engine/language-server/src/test/scala/org/enso/languageserver/websocket/json/BaseServerTest.scala # engine/language-server/src/test/scala/org/enso/languageserver/websocket/json/FileManagerTest.scala # engine/language-server/src/test/scala/org/enso/languageserver/websocket/json/VcsManagerTest.scala
@kustosz please take a look at this PR |
Ok @xvcgreg @sylwiabr this is ready for QA according to Marcin :) To test it, you need |
QA: passed 🍏 : |
Perfect! It has landed <3 |
Pull Request Description
Added a special escape hatch in the searcher to run AI completions. Screencast was posted previously on discord. You'll need to export
OPENAI_API_KEY
to use the feature, otherwise it's a no-op. Currently only works with tables, more prompts need to be written. Also a few new issues opened to enable nicer prompts in the future.Important Notes
The whole searcher-side of things is a mess and it's only a PoC, so don't spend too much time reviewing it, think about how to make it a feature instead :P
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.