forked from eclipse-theia/theia
-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: open ai messages #160
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- add ui - add openai integration
- introduce ChatResponseParts - LanguageModelProvider can be used in both backend and frontend - frontend access is generically implemented independent of the actual LanguageModelProvider implementation - split code into four packages: - ai-agent: containing the AgentDispatcher. At the moment just delegates to the LanguageModelProvider. Can run in both frontend and backend - ai-chat: only containing the UI part of the chat. - ai-model-provider: containing the infrastructure of the LanguageModelProvider and its frontend bridge - ai-openao: only contains the Open AI LanguageModelProvider
Implements the LanguageModelProviderRegistry which is able to handle an arbitrary number of LanguageModelProviders. Refactors the LanguageModelProvider to only return a simple text or stream of text. It's now the agent's responsibility to convert this into response parts. Therefore the interfaces are also moved to the agent package. The LanguageModelProviderRegistry implementation for the frontend handles all LanguageModelProvider registered in the frontend as well as in the backend. Fixes the StreamNode in the tree-widget to update itself correctly when new tokens arrive.
Introduces ChatModel, including nested ChatRequestModel and ChatResponseModel to represent chat sessions. The chat models allow to inspect and track requests and their responses. Also introduces the ChatService which can be used to manage chat sessions and sending requests. Architecture is inspired by the VS Code implementation, however it intends to be more generic.
…e-theia#13936) fixes eclipse-theia#13800 contributed on behalf of STMicroelectronics Signed-off-by: Remi Schnekenburger <[email protected]> Co-authored-by: Philip Langer <[email protected]>
…#13912) fixes eclipse-theia#13886 contributed on behalf of STMicroelectronics Signed-off-by: Remi Schnekenburger <[email protected]>
Change-Id: I179432698332ff52b33aba7b1f7e203f2bee9c77
fixes eclipse-theia#13848 contributed on behalf of STMicroelectronics Signed-off-by: Remi Schnekenburger <[email protected]>
Change-Id: I80d33303ceadf940f17265b7d910a5c13b59ec89
eclipsesource/osweek-2024#47 Change-Id: Ib9dd82e3ba062990f5642883bc9439aca52931ad
Change-Id: I186190dede14d729992977c2805e2c07100c2d17
Change-Id: Ia257c9a65b5f2bb9aa3e9ccc506f6394d744ff8f
…a#13900) fixes eclipse-theia#13846 contributed on behalf of STMicroelectronics
Co-authored-by: sgraband <[email protected]>
Co-authored-by: Olaf Lessenich <[email protected]>
- Move today variable contribution to common where it should have been - Add a variable to retrieve the complete content of the current editor Relates to eclipsesource/osweek-2024#46
Introduces ChatAgent to assist users in creating PRs based on current changes. The system prompt now asks for the git diff, status, ticket link, and PR template. Added two variables, #git-status and #git-diff, for capturing status and diff information. Added the "Invoke PR finalization" command, which opens the chat and sends a predefined message including the git diff and status. Includes various bug fixes. Co-authored-by: Lucas Koehler <[email protected]>
- Allow user to lock auto-scroll on chat window toolbar - Persist lock state during reloads Fixes eclipsesource/osweek-2024#62
- add a default template that the Default Chat Agent can use
- add a variable contribution to list available agents
- Ensure variables and arguments are properly handled for prompts Fixes eclipsesource/osweek-2024#93 Co-authored-by: Johannes Faltermeier <[email protected]>
Fix AI chat view command registration
- add a function call registry - refactor the Workspace Agent to use the Function registry - move getTools to its own method - remove override of callLlm in WorkspaceAgent - rename the Workspace Agent (TheiaWorkspaceAgent => Workspace)
- Theia variables are registered a bit delayed so UI needs to update - Enhance variable service with event for variable changes Fixes eclipsesource/osweek-2024#105
* feat: configure open ai providers from frontend - provide preferences to set OpenAI Api Key - provide preferences to add/remove OpenAI models - add listener mechanism for language model add/remove - propagate backend language model registry changes automatically to frontend - add error handling in chat view in case an error is thrown during a request
eclipsesource/osweek-2024#109 Change-Id: I530b0d87a7baea0026bafaec8decd0479f5357d8
- Agents select LLM based on settings and requirements or default - Ensure we show the default case in case requirements do not set LLM Fixes eclipsesource/osweek-2024#100
* adds an AbstractChatAgent * this does * get the messages with optional system prompt * record the request * get a response from the language model * _passes response to an abstract function to add response contents_ * completes response * records the response * Default Chat Agent extends AbstractChatAgent * Add a further AbstractTextToModelParsingChatAgent that extends AbstractChatAgent * splits adding contents to response in three steps * getting response as plain text * parsing text to an object * based on object add contents to response * CommandChatAgent extends AbstractTextToModelParsingChatAgent
- add cancellation token support - offer cancel for chat requests - trigger cancel for code completions - also nicely formats requests in the output channels Co-authored-by: Stefan Dirix <[email protected]>
Added multi conversation support to the chat window. A new add button can be used to create a new chat session (this can also be done programatically). With a history button the user can switch to another chat session. This is done via a quick Picker that shows all other sessions that you can switch to. Changed the PR finalization feature so that it opens up a new chat session. Co-authored-by: Haydar Metin <[email protected]>
- Register an inline completion provider - Check for cancellation regularly - Introduce preference for inline code completion Fixes eclipsesource/osweek-2024#61
Co-authored-by: Simon Graband <[email protected]>
The cancel button is now part of the input line so it is turned on while a request is in progress. Otherwise the submit icon is shown. --------- Co-authored-by: Stefan Dirix <[email protected]>
- add an AgentService to list all (enabled) agents - add methods to track enabled/disabled agents - update the configuration UI to enable/disable agents - fix undefined exception in CodeFixAgent Settings UI
Change-Id: I4f7233051b776aa704dc4b448d44ebe8baef5506
Beforehand we would always jumpt to the latest chat,w hen another one was deleted. Now this will only happen if you manage to delete the active one, which should not happen via UI.
- don't bind the widgets as singletons because they must be recreated after disposal - Add an action to extract the chat view to a separate window - Include AI Chat UI CSS in the secondary window - avoid PerfectScroll rails Note that this does result in odd behaviour when opening the view again in the main window, yanking it out of\the separate window, as then closing the separate window closes the view that is now in the main window. This boils down to a known issue in the general support for secondary windows. Co-authored-by: Remi Schnekenburger <[email protected]>
…es (#144) Improve the AI chat ui input field with autocompletion for chat agents and ai variables: Typing `@` allows to autocomplete chat agents. Typing `#` allows to autocomplete ai variables. To facilitate this, the input field was changed from a textarea to an inline monaco editor. A custom language `ai-chat-view-language` is introduced to provide the completions via completion item providers that query the ChatAgentService resp. AIVariableService Co-authored-by: Alexandra Muntean <[email protected]> Co-authored-by: Martin Fleck <[email protected]>
wrong pr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
Fixes an edge case in message handling for open ai
How to test
The LM should properly answer. Previously there was an error as a message sent to OpenAI API was
null
, resulting in a 400 errorFollow-ups
Review checklist
Reminder for reviewers