feat: add latest models to Google Generative AI, Anthropic Models (#4685)
* updated models models updates * Update google_generative_ai_constants.py formatting
This commit is contained in:
parent
8bb9c015a3
commit
c3dbabbd35
4 changed files with 31 additions and 8 deletions
10
src/backend/base/langflow/base/models/anthropic_constants.py
Normal file
10
src/backend/base/langflow/base/models/anthropic_constants.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
ANTHROPIC_MODELS = [
|
||||
"claude-3-5-sonnet-latest",
|
||||
"claude-3-5-haiku-latest",
|
||||
"claude-3-opus-latest",
|
||||
"claude-3-5-sonnet-20240620",
|
||||
"claude-3-5-sonnet-20241022",
|
||||
"claude-3-5-haiku-20241022",
|
||||
"claude-3-sonnet-20240229",
|
||||
"claude-3-haiku-20240307",
|
||||
]
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
GOOGLE_GENERATIVE_AI_MODELS = [
|
||||
"gemini-1.5-pro",
|
||||
"gemini-1.5-flash",
|
||||
"gemini-1.5-flash-8b",
|
||||
"gemini-1.0-pro",
|
||||
"gemini-1.0-pro-vision",
|
||||
"gemini-1.5-pro-001",
|
||||
"gemini-1.5-pro-002",
|
||||
"gemini-1.5-flash-001",
|
||||
"gemini-1.5-flash-002",
|
||||
"gemini-1.5-pro-exp-0827",
|
||||
"gemini-1.5-flash-exp-0827",
|
||||
"gemini-1.5-flash-8b-exp-0827",
|
||||
"gemini-1.5-flash-8b-exp-0924",
|
||||
"gemini-exp-1114",
|
||||
]
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
from pydantic.v1 import SecretStr
|
||||
|
||||
from langflow.base.models.anthropic_constants import ANTHROPIC_MODELS
|
||||
from langflow.base.models.model import LCModelComponent
|
||||
from langflow.field_typing import LanguageModel
|
||||
from langflow.inputs.inputs import HandleInput
|
||||
|
|
@ -24,14 +25,9 @@ class AnthropicModelComponent(LCModelComponent):
|
|||
DropdownInput(
|
||||
name="model",
|
||||
display_name="Model Name",
|
||||
options=[
|
||||
"claude-3-5-sonnet-20240620",
|
||||
"claude-3-opus-20240229",
|
||||
"claude-3-sonnet-20240229",
|
||||
"claude-3-haiku-20240307",
|
||||
],
|
||||
options=ANTHROPIC_MODELS,
|
||||
info="https://python.langchain.com/docs/integrations/chat/anthropic",
|
||||
value="claude-3-5-sonnet-20240620",
|
||||
value="claude-3-5-sonnet-latest",
|
||||
),
|
||||
SecretStrInput(name="anthropic_api_key", display_name="Anthropic API Key", info="Your Anthropic API key."),
|
||||
FloatInput(name="temperature", display_name="Temperature", value=0.1),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from pydantic.v1 import SecretStr
|
||||
|
||||
from langflow.base.models.google_generative_ai_constants import GOOGLE_GENERATIVE_AI_MODELS
|
||||
from langflow.base.models.model import LCModelComponent
|
||||
from langflow.field_typing import LanguageModel
|
||||
from langflow.inputs import DropdownInput, FloatInput, IntInput, SecretStrInput
|
||||
|
|
@ -21,7 +22,7 @@ class GoogleGenerativeAIComponent(LCModelComponent):
|
|||
name="model",
|
||||
display_name="Model",
|
||||
info="The name of the model to use.",
|
||||
options=["gemini-1.5-pro", "gemini-1.5-flash", "gemini-1.0-pro", "gemini-1.0-pro-vision"],
|
||||
options=GOOGLE_GENERATIVE_AI_MODELS,
|
||||
value="gemini-1.5-pro",
|
||||
),
|
||||
SecretStrInput(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue