Merge remote-tracking branch 'origin/dev' into better_server

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-08 11:49:56 -03:00
commit 84a46d5869
8 changed files with 474 additions and 413 deletions

View file

@ -58,6 +58,7 @@ llms:
- Cohere
- Anthropic
- ChatAnthropic
- HuggingFaceHub
memories:
- ConversationBufferMemory
- ConversationSummaryMemory

View file

@ -45,8 +45,12 @@ def try_setting_streaming_options(langchain_object, websocket):
langchain_object.llm_chain, "llm"
):
llm = langchain_object.llm_chain.llm
if isinstance(llm, BaseLanguageModel) and hasattr(llm, "streaming"):
llm.streaming = True
if isinstance(llm, BaseLanguageModel):
if hasattr(llm, "streaming") and isinstance(llm.streaming, bool):
llm.streaming = True
elif hasattr(llm, "stream") and isinstance(llm.stream, bool):
llm.stream = True
return langchain_object

View file

@ -46,7 +46,8 @@ class LLMFrontendNode(FrontendNode):
field.required = True
field.show = True
field.is_list = True
field.options = ["text-generation", "text2text-generation"]
field.options = ["text-generation", "text2text-generation", "summarization"]
field.value = field.options[0]
field.advanced = True
if display_name := display_names_dict.get(field.name):