🐛 fix(config.yaml): add CTransformers to the list of supported llms

🐛 fix(utils.py): fix setting of streaming option for llm
🎨 style(llms.py): add model_file and model_type fields to the list of non-advanced fields
The first change adds CTransformers to the list of supported llms in the config.yaml file. The second change fixes a bug in the try_setting_streaming_options function in utils.py where the streaming option was not being set correctly. The third change is a style change that adds the model_file and model_type fields to the list of non-advanced fields in the LLMFrontendNode class in llms.py.
This commit is contained in:
Gabriel Almeida 2023-05-28 17:14:49 -03:00
commit c2027898de
3 changed files with 5 additions and 5 deletions

View file

@ -45,13 +45,13 @@ documentloaders:
embeddings:
- OpenAIEmbeddings
- HuggingFaceEmbeddings
llms:
- OpenAI
# - AzureOpenAI
- ChatOpenAI
- HuggingFaceHub
- LlamaCpp
- CTransformers
memories:
- ConversationBufferMemory
- ConversationSummaryMemory
@ -113,7 +113,7 @@ vectorstores:
- Qdrant
- Weaviate
wrappers:
- RequestsWrapper # Wait more tests
- RequestsWrapper
# - ChatPromptTemplate
# - SystemMessagePromptTemplate
# - HumanMessagePromptTemplate

View file

@ -44,7 +44,7 @@ def try_setting_streaming_options(langchain_object, websocket):
langchain_object.llm_chain, "llm"
):
llm = langchain_object.llm_chain.llm
if isinstance(llm, BaseLanguageModel):
llm.streaming = bool(hasattr(llm, "streaming"))
if isinstance(llm, BaseLanguageModel) and hasattr(llm, "streaming"):
llm.streaming = True
return langchain_object

View file

@ -43,7 +43,7 @@ class LLMFrontendNode(FrontendNode):
field.field_type = "code"
field.advanced = True
field.show = True
elif field.name in ["model_name", "temperature"]:
elif field.name in ["model_name", "temperature", "model_file", "model_type"]:
field.advanced = False
field.show = True