Refactor AzureChatOpenAI components and update documentation links
This commit is contained in:
parent
521bdf9f7d
commit
951384284d
3 changed files with 11 additions and 31 deletions
|
|
@ -1,13 +1,17 @@
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from langflow import CustomComponent
|
|
||||||
from langchain.llms.base import BaseLanguageModel
|
from langchain.llms.base import BaseLanguageModel
|
||||||
from langchain_community.chat_models.azure_openai import AzureChatOpenAI
|
from langchain_community.chat_models.azure_openai import AzureChatOpenAI
|
||||||
|
|
||||||
|
from langflow import CustomComponent
|
||||||
|
|
||||||
class AzureChatOpenAIComponent(CustomComponent):
|
|
||||||
|
class AzureChatOpenAISpecsComponent(CustomComponent):
|
||||||
display_name: str = "AzureChatOpenAI"
|
display_name: str = "AzureChatOpenAI"
|
||||||
description: str = "LLM model from Azure OpenAI."
|
description: str = "LLM model from Azure OpenAI."
|
||||||
documentation: str = "https://python.langchain.com/docs/integrations/llms/azure_openai"
|
documentation: str = (
|
||||||
|
"https://python.langchain.com/docs/integrations/llms/azure_openai"
|
||||||
|
)
|
||||||
beta = False
|
beta = False
|
||||||
|
|
||||||
AZURE_OPENAI_MODELS = [
|
AZURE_OPENAI_MODELS = [
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,11 @@ from langflow import CustomComponent
|
||||||
|
|
||||||
|
|
||||||
class AzureChatOpenAIComponent(CustomComponent):
|
class AzureChatOpenAIComponent(CustomComponent):
|
||||||
display_name: str = "AzureOpenAIModel"
|
display_name: str = "AzureOpenAI Model"
|
||||||
description: str = "Generate text using LLM model from Azure OpenAI."
|
description: str = "Generate text using LLM model from Azure OpenAI."
|
||||||
documentation: str = "https://python.langchain.com/docs/integrations/llms/azure_openai"
|
documentation: str = (
|
||||||
|
"https://python.langchain.com/docs/integrations/llms/azure_openai"
|
||||||
|
)
|
||||||
beta = False
|
beta = False
|
||||||
|
|
||||||
AZURE_OPENAI_MODELS = [
|
AZURE_OPENAI_MODELS = [
|
||||||
|
|
|
||||||
|
|
@ -109,32 +109,6 @@ embeddings:
|
||||||
OllamaEmbeddings:
|
OllamaEmbeddings:
|
||||||
documentation: "https://python.langchain.com/docs/modules/data_connection/text_embedding/integrations/ollama"
|
documentation: "https://python.langchain.com/docs/modules/data_connection/text_embedding/integrations/ollama"
|
||||||
|
|
||||||
llms:
|
|
||||||
OpenAI:
|
|
||||||
documentation: "https://python.langchain.com/docs/modules/model_io/models/llms/integrations/openai"
|
|
||||||
ChatOpenAI:
|
|
||||||
documentation: "https://python.langchain.com/docs/modules/model_io/models/chat/integrations/openai"
|
|
||||||
LlamaCpp:
|
|
||||||
documentation: "https://python.langchain.com/docs/modules/model_io/models/llms/integrations/llamacpp"
|
|
||||||
CTransformers:
|
|
||||||
documentation: "https://python.langchain.com/docs/modules/model_io/models/llms/integrations/ctransformers"
|
|
||||||
Cohere:
|
|
||||||
documentation: "https://python.langchain.com/docs/modules/model_io/models/llms/integrations/cohere"
|
|
||||||
Anthropic:
|
|
||||||
documentation: ""
|
|
||||||
ChatAnthropic:
|
|
||||||
documentation: "https://python.langchain.com/docs/modules/model_io/models/chat/integrations/anthropic"
|
|
||||||
HuggingFaceHub:
|
|
||||||
documentation: "https://python.langchain.com/docs/modules/model_io/models/llms/integrations/huggingface_hub"
|
|
||||||
VertexAI:
|
|
||||||
documentation: "https://python.langchain.com/docs/modules/model_io/models/llms/integrations/google_vertex_ai_palm"
|
|
||||||
###
|
|
||||||
# There's a bug in this component deactivating until we get it sorted: _language_models.py", line 804, in send_message
|
|
||||||
# is_blocked=safety_attributes.get("blocked", False),
|
|
||||||
# AttributeError: 'list' object has no attribute 'get'
|
|
||||||
ChatVertexAI:
|
|
||||||
documentation: "https://python.langchain.com/docs/modules/model_io/models/chat/integrations/google_vertex_ai_palm"
|
|
||||||
###
|
|
||||||
memories:
|
memories:
|
||||||
# https://github.com/supabase-community/supabase-py/issues/482
|
# https://github.com/supabase-community/supabase-py/issues/482
|
||||||
# ZepChatMessageHistory:
|
# ZepChatMessageHistory:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue