mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #2175] [CLOSED] feat: function calling #43965
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/2175
Author: @not-nullptr
Created: 5/11/2024
Status: ❌ Closed
Base:
dev← Head:function-calling📝 Commits (4)
d4e2bbeadd local function callingb3a0430use $i18n for localizations4d8b382fix files not saving8bdb48badd error handling📊 Changes
11 files changed (+988 additions, -5 deletions)
View changed files
📝
package-lock.json(+6 -0)📝
package.json(+1 -0)➕
src/lib/apis/functions/index.ts(+191 -0)➕
src/lib/apis/monaco/index.ts(+34 -0)➕
src/lib/components/chat/Settings/Functions.svelte(+431 -0)📝
src/lib/components/chat/SettingsModal.svelte(+55 -4)📝
src/lib/stores/index.ts(+1 -1)📝
src/routes/(app)/+page.svelte(+32 -0)📝
src/routes/(app)/c/[id]/+page.svelte(+32 -0)📝
src/routes/+layout.svelte(+33 -0)➕
src/routes/editor/[function]/+page.svelte(+172 -0)📄 Description
Pull Request Checklist
devbranch.Description
i've implemented function calling, since this is one of the last "big" features relating to LLMs that open-webui has yet to have implemented.
Changelog Entry
Added
Fixed
(n/a)
Changed
(n/a)
Removed
(n/a)
Security
(n/a)
Breaking Changes
(n/a)
Additional Information
this PR also adds
monacoas a dependency, since functions are written in-the-browser with first-class typescript support. i looked into writing my own editor - this is not an option (for me, at least)functions are written to
localStorage, this is because i don't know python and i'd rather not write poor code for the backend .there's still some work to be done (such as adding validation for parameter names - they can only include values which a javascript variable could include) but its functional.
demo:
https://github.com/open-webui/open-webui/assets/62841684/70bcdd8c-d887-43f7-8f7b-54b5ac1dab31
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.