feat: 💄 add textgenwebui as official option in Ui
This commit is contained in:
parent
404f7f8089
commit
09ac7a7fc0
7 changed files with 34 additions and 10 deletions
|
|
@ -112,7 +112,7 @@ function ModelConfig() {
|
|||
|
||||
<div className="px-2">
|
||||
<div style={{ display: "flex", alignItems: "center" }}>
|
||||
{vscMediaUrl && (
|
||||
{(vscMediaUrl && modelInfo?.icon) && (
|
||||
<img
|
||||
src={`${vscMediaUrl}/logos/${modelInfo?.icon}`}
|
||||
height="24px"
|
||||
|
|
|
|||
|
|
@ -651,6 +651,27 @@ After it's up and running, you can start using Continue.`,
|
|||
packages: osModels,
|
||||
collectInputFor: [...completionParamsInputs],
|
||||
},
|
||||
textgenwebui: {
|
||||
title: "text-generation-webui",
|
||||
class: "TextGenWebUI",
|
||||
description: "A popular open-source front-end for serving LLMs locally",
|
||||
longDescription: `text-generation-webui is a comprehensive, open-source language model UI and local server. You can also set it up with an [OpenAI-compatible server extension](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#an-openedai-api-openai-like), but this model provider is made to interface with the built-in server, which has a different format. To setup the text-generation-webui server, take the following steps:
|
||||
|
||||
1. Clone the repository: \`git clone https://github.com/oobabooga/text-generation-webui/tree/main\`
|
||||
2. Change into the directory: \`cd text-generation-webui\`
|
||||
3. Run the one-click installer script for your operating system, using the --api flag:
|
||||
- Mac: \`sh start_macos.sh --api\`
|
||||
- Linux: \`sh start_linux.sh --api\`
|
||||
- Windows: \`. start_windows.bat --api\`
|
||||
- WSL: \`. start_wsl.bat --api\`
|
||||
4. Find a model to run and download its weights into the folder \`text-generation-webui/models\`. The best place to find models is [The Bloke on HuggingFace](https://huggingface.co/TheBloke)
|
||||
5. Navigate to [the UI](http://127.0.0.1:7860), click the "Model" tab, and load the model you've downloaded
|
||||
6. Once the model is loaded, you can start using Continue`,
|
||||
icon: undefined,
|
||||
tags: [ModelProviderTag.Local, ModelProviderTag["Open-Source"]],
|
||||
packages: osModels,
|
||||
collectInputFor: [...completionParamsInputs],
|
||||
},
|
||||
palm: {
|
||||
title: "Google PaLM API",
|
||||
class: "GooglePaLMAPI",
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ MODEL_MODULE_NAMES = {
|
|||
"HuggingFaceInferenceAPI": "hf_inference_api",
|
||||
"HuggingFaceTGI": "hf_tgi",
|
||||
"GooglePaLMAPI": "google_palm_api",
|
||||
"TextGenWebUI": "text_gen_webui"
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@ from .openai_free_trial import OpenAIFreeTrial # noqa: F401
|
|||
from .proxy_server import ProxyServer # noqa: F401
|
||||
from .queued import QueuedLLM # noqa: F401
|
||||
from .replicate import ReplicateLLM # noqa: F401
|
||||
from .text_gen_interface import TextGenUI # noqa: F401
|
||||
from .text_gen_webui import TextGenWebUI # noqa: F401
|
||||
from .together import TogetherLLM # noqa: F401
|
||||
|
|
|
|||
|
|
@ -10,17 +10,17 @@ from .prompts.chat import llama2_template_messages
|
|||
from .prompts.edit import simplest_edit_prompt
|
||||
|
||||
|
||||
class TextGenUI(LLM):
|
||||
class TextGenWebUI(LLM):
|
||||
"""
|
||||
TextGenUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, but if for some reason that doesn't work, you can use this class like so:
|
||||
TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, but if for some reason that doesn't work, you can use this class like so:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.libs.llm.text_gen_interface import TextGenUI
|
||||
from continuedev.libs.llm.text_gen_webui import TextGenWebUI
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
models=Models(
|
||||
default=TextGenUI(
|
||||
default=TextGenWebUI(
|
||||
model="<MODEL_NAME>",
|
||||
)
|
||||
)
|
||||
|
|
@ -28,13 +28,13 @@ class TextGenUI(LLM):
|
|||
```
|
||||
"""
|
||||
|
||||
model: str = "text-gen-ui"
|
||||
model: str = "text-gen-webui"
|
||||
server_url: str = Field(
|
||||
"http://localhost:5000", description="URL of your TextGenUI server"
|
||||
"http://localhost:5000", description="URL of your TextGenWebUI server"
|
||||
)
|
||||
streaming_url: str = Field(
|
||||
"http://localhost:5005",
|
||||
description="URL of your TextGenUI streaming server (separate from main server URL)",
|
||||
description="URL of your TextGenWebUI streaming server (separate from main server URL)",
|
||||
)
|
||||
|
||||
prompt_templates = {
|
||||
|
|
@ -84,6 +84,8 @@ def migrateConfigFile(existing: str) -> Optional[str]:
|
|||
.replace("maybe_proxy_openai", "openai_free_trial")
|
||||
.replace("unused=", "saved=")
|
||||
.replace("medium=", "summarize=")
|
||||
.replace("TextGenUI", "TextGenWebUI")
|
||||
.replace("text_gen_interface", "text_gen_webui")
|
||||
)
|
||||
if migrated != existing:
|
||||
return migrated
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ LLM_MODULES = [
|
|||
("anthropic", "AnthropicLLM"),
|
||||
("ggml", "GGML"),
|
||||
("llamacpp", "LlamaCpp"),
|
||||
("text_gen_interface", "TextGenUI"),
|
||||
("text_gen_webui", "TextGenWebUI"),
|
||||
("ollama", "Ollama"),
|
||||
("replicate", "ReplicateLLM"),
|
||||
("together", "TogetherLLM"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue