Add support to llama as llm

This commit is contained in:
Yoaz Menda 2023-04-08 08:24:10 +02:00 • committed by Gabriel Luiz Freitas Almeida
commit f02f0f9c98
7 changed files with 31 additions and 4 deletions

View file

@ -27,6 +27,7 @@ llms:
# - AzureOpenAI
- ChatOpenAI
- HuggingFaceHub
- LlamaCpp
tools:
- Search

View file

@ -12,12 +12,14 @@ from langchain import (
)
from langchain.agents import agent_toolkits
from langchain.chat_models import ChatOpenAI
from langchain.llms import LlamaCpp
from langflow.interface.importing.utils import import_class
## LLM
llm_type_to_cls_dict = llms.type_to_cls_dict
llm_type_to_cls_dict["openai-chat"] = ChatOpenAI # type: ignore
llm_type_to_cls_dict["llamacpp"] = LlamaCpp # type: ignore
## Chain
chain_type_to_cls_dict: dict[str, Any] = {

View file

@ -59,5 +59,5 @@
"last 1 safari version"
]
},
"proxy": "http://backend:7860"
"proxy": "http://127.0.0.1:5003"
}