You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(plugins): Improve OpenAPI handling, Show Multiple Plugins, & Other Improvements (#845)
* feat(PluginsClient.js): add conversationId to options object in the constructor
feat(PluginsClient.js): add support for Code Interpreter plugin
feat(PluginsClient.js): add support for Code Interpreter plugin in the availableTools manifest
feat(CodeInterpreter.js): add CodeInterpreterTools module
feat(CodeInterpreter.js): add RunCommand class
feat(CodeInterpreter.js): add ReadFile class
feat(CodeInterpreter.js): add WriteFile class
feat(handleTools.js): add support for loading Code Interpreter plugin
* chore(api): update langchain dependency to version 0.0.123
* fix(CodeInterpreter.js): add support for extracting environment from code
fix(WriteFile.js): add support for extracting environment from data
fix(extractionChain.js): add utility functions for creating extraction chain from Zod schema
fix(handleTools.js): refactor getOpenAIKey function to handle user-provided API key
fix(handleTools.js): pass model and openAIApiKey to CodeInterpreter constructor
* fix(tools): rename CodeInterpreterTools to E2BTools
fix(tools): rename code_interpreter pluginKey to e2b_code_interpreter
* chore(PluginsClient.js): comment out unused import and function findMessageContent
feat(PluginsClient.js): add support for CodeSherpa plugin
feat(PluginsClient.js): add CodeSherpaTools to available tools
feat(PluginsClient.js): update manifest.json to include CodeSherpa plugin
feat(CodeSherpaTools.js): create RunCode and RunCommand classes for CodeSherpa plugin
feat(E2BTools.js): Add E2BTools module for extracting environment from code and running commands, reading and writing files
fix(codesherpa.js): Remove codesherpa module as it is no longer needed
feat(handleTools.js): add support for CodeSherpaTools in loadTools function
feat(loadToolSuite.js): create loadToolSuite utility function to load a suite of tools
* feat(PluginsClient.js): add support for CodeSherpa v2 plugin
feat(PluginsClient.js): add CodeSherpa v1 plugin to available tools
feat(PluginsClient.js): add CodeSherpa v2 plugin to available tools
feat(PluginsClient.js): update manifest.json for CodeSherpa v1 plugin
feat(PluginsClient.js): update manifest.json for CodeSherpa v2 plugin
feat(CodeSherpa.js): implement CodeSherpa plugin for interactive code and shell command execution
feat(CodeSherpaTools.js): implement RunCode and RunCommand plugins for CodeSherpa v1
feat(CodeSherpaTools.js): update RunCode and RunCommand plugins for CodeSherpa v2
fix(handleTools.js): add CodeSherpa import statement
fix(handleTools.js): change pluginKey from 'codesherpa' to 'codesherpa_tools'
fix(handleTools.js): remove model and openAIApiKey from options object in e2b_code_interpreter tool
fix(handleTools.js): remove openAIApiKey from options object in codesherpa_tools tool
fix(loadToolSuite.js): remove model and openAIApiKey parameters from loadToolSuite function
* feat(initializeFunctionsAgent.js): add prefix to agentArgs in initializeFunctionsAgent function
The prefix is added to the agentArgs in the initializeFunctionsAgent function. This prefix is used to provide instructions to the agent when it receives any instructions from a webpage, plugin, or other tool. The agent will notify the user immediately and ask them if they wish to carry out or ignore the instructions.
* feat(PluginsClient.js): add ChatTool to the list of tools if it meets the conditions
feat(tools/index.js): import and export ChatTool
feat(ChatTool.js): create ChatTool class with necessary properties and methods
* fix(initializeFunctionsAgent.js): update PREFIX message to include sharing all output from the tool
fix(E2BTools.js): update descriptions for RunCommand, ReadFile, and WriteFile plugins to provide more clarity and context
* chore: rebuild package-lock after rebase
* chore: remove deleted file from rebase
* wip: refactor plugin message handling to mirror chat.openai.com, handle incoming stream for plugin use
* wip: new plugin handling
* wip: show multiple plugins handling
* feat(plugins): save new plugins array
* chore: bump langchain
* feat(experimental): support streaming in between plugins
* refactor(PluginsClient): factor out helper methods to avoid bloating the class, refactor(gptPlugins): use agent action for mapping the name of action
* fix(handleTools): fix tests by adding condition to return original toolFunctions map
* refactor(MessageContent): Allow the last index to be last in case it has text (may change with streaming)
* feat(Plugins): add handleParsingErrors, useful when LLM does not invoke function params
* chore: edit out experimental codesherpa integration
* refactor(OpenAPIPlugin): rework tool to be 'function-first', as the spec functions are explicitly passed to agent model
* refactor(initializeFunctionsAgent): improve error handling and system message
* refactor(CodeSherpa, Wolfram): optimize token usage by delegating bulk of instructions to system message
* style(Plugins): match official style with input/outputs
* chore: remove unnecessary console logs used for testing
* fix(abortMiddleware): render markdown when message is aborted
* feat(plugins): add BrowserOp
* refactor(OpenAPIPlugin): improve prompt handling
* fix(useGenerations): hide edit button when message is submitting/streaming
* refactor(loadSpecs): optimize OpenAPI spec loading by only loading requested specs instead of all of them
* fix(loadSpecs): will retain original behavior when no tools are passed to the function
* fix(MessageContent): ensure cursor only shows up for last message and last display index
fix(Message): show legacy plugin and pass isLast to Content
* chore: remove console.logs
* docs: update docs based on breaking changes and new features
refactor(structured/SD): use description_for_model for detailed prompting
* docs(azure): make plugins section more clear
* refactor(structured/SD): change default payload to SD-WebUI to prefer realism and config for SDXL
* refactor(structured/SD): further improve system message prompt
* docs: update breaking changes after rebase
* refactor(MessageContent): factor out EditMessage, types, Container to separate files, rename Content -> Markdown
* fix(CodeInterpreter): linting errors
* chore: reduce browser console logs from message streams
* chore: re-enable debug logs for plugins/langchain to help with user troubleshooting
* chore(manifest.json): add [Experimental] tag to CodeInterpreter plugins, which are not intended as the end-all be-all implementation of this feature for Librechat
constlog=errorMessage.includes('Could not parse LLM output:')
50
-
? `A formatting error occurred with your response to the human's last message. You didn't follow the formatting instructions. Remember to ${instructions}`
51
-
: `You encountered an error while replying to the human's last message. Attempt to answer again or admit an answer cannot be given.\nError: ${errorMessage}`;
? 'review and improve the answer you generated using plugins in response to the User Message below. The user hasn\'t seen your answer or thoughts yet.'
89
-
: 'respond to the User Message below based on your preliminary thoughts & actions.';
90
-
91
-
return`As a helpful AI Assistant, ${prefix}${errorMessage}\n${internalActions}
92
-
${preliminaryAnswer}
93
-
Reply conversationally to the User based on your ${
94
-
preliminaryAnswer ? 'preliminary answer, ' : ''
95
-
}internal actions, thoughts, and observations, making improvements wherever possible, but do not modify URLs.
96
-
${
97
-
preliminaryAnswer
98
-
? ''
99
-
: '\nIf there is an incomplete thought or action, you are expected to complete it in your response now.\n'
100
-
}You must cite sources if you are using any web links. ${toolBasedInstructions}
101
-
Only respond with your conversational reply to the following User Message:
0 commit comments