From e889bb38bca073ee14e57428b53aac602aa1159d Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Wed, 28 Feb 2024 19:30:26 -0300 Subject: [PATCH 1/5] added new icons --- .../AzureOpenAiEmbeddings/AzureChatOpenAi.jsx | 67 +++++++++++++++++++ .../AzureOpenAiEmbeddings/AzureChatOpenAi.svg | 1 + .../src/icons/AzureOpenAiEmbeddings/index.tsx | 9 +++ src/frontend/src/icons/Ollama/Ollama.jsx | 64 ++++++++++++++++++ src/frontend/src/icons/Ollama/Ollama.svg | 1 + src/frontend/src/icons/Ollama/index.tsx | 9 +++ src/frontend/src/icons/Postgres/Redis.jsx | 67 +++++++++++++++++++ src/frontend/src/icons/Postgres/Redis.svg | 1 + src/frontend/src/icons/Postgres/index.tsx | 9 +++ src/frontend/src/icons/Redis/Redis.jsx | 67 +++++++++++++++++++ src/frontend/src/icons/Redis/Redis.svg | 1 + src/frontend/src/icons/Redis/index.tsx | 8 +++ src/frontend/src/utils/styleUtils.ts | 18 ++++- 13 files changed, 321 insertions(+), 1 deletion(-) create mode 100644 src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.jsx create mode 100644 src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.svg create mode 100644 src/frontend/src/icons/AzureOpenAiEmbeddings/index.tsx create mode 100644 src/frontend/src/icons/Ollama/Ollama.jsx create mode 100644 src/frontend/src/icons/Ollama/Ollama.svg create mode 100644 src/frontend/src/icons/Ollama/index.tsx create mode 100644 src/frontend/src/icons/Postgres/Redis.jsx create mode 100644 src/frontend/src/icons/Postgres/Redis.svg create mode 100644 src/frontend/src/icons/Postgres/index.tsx create mode 100644 src/frontend/src/icons/Redis/Redis.jsx create mode 100644 src/frontend/src/icons/Redis/Redis.svg create mode 100644 src/frontend/src/icons/Redis/index.tsx diff --git a/src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.jsx b/src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.jsx new file mode 100644 index 000000000..0030169f8 --- /dev/null +++ b/src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.jsx @@ -0,0 +1,67 @@ +export const SvgAzureChatOpenAi = (props) => ( + + + + + + + + + + + + + + + + + + + + + + + + + +); +export default SvgAzureChatOpenAi; diff --git a/src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.svg b/src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.svg new file mode 100644 index 000000000..cb695fac2 --- /dev/null +++ b/src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/frontend/src/icons/AzureOpenAiEmbeddings/index.tsx b/src/frontend/src/icons/AzureOpenAiEmbeddings/index.tsx new file mode 100644 index 000000000..2444d32b0 --- /dev/null +++ b/src/frontend/src/icons/AzureOpenAiEmbeddings/index.tsx @@ -0,0 +1,9 @@ +import React, { forwardRef } from "react"; +import SvgAzureChatOpenAi from "./AzureChatOpenAi"; + +export const AzureOpenAiEmbeddingsIcon = forwardRef< + SVGSVGElement, + React.PropsWithChildren<{}> +>((props, ref) => { + return ; +}); diff --git a/src/frontend/src/icons/Ollama/Ollama.jsx b/src/frontend/src/icons/Ollama/Ollama.jsx new file mode 100644 index 000000000..70086a373 --- /dev/null +++ b/src/frontend/src/icons/Ollama/Ollama.jsx @@ -0,0 +1,64 @@ +export const SvgOllama = (props) => ( + + + + + + + + + + + + + + + + + + + + + + +); +export default SvgOllama; diff --git a/src/frontend/src/icons/Ollama/Ollama.svg b/src/frontend/src/icons/Ollama/Ollama.svg new file mode 100644 index 000000000..f189d6efb --- /dev/null +++ b/src/frontend/src/icons/Ollama/Ollama.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/frontend/src/icons/Ollama/index.tsx b/src/frontend/src/icons/Ollama/index.tsx new file mode 100644 index 000000000..4d49fa198 --- /dev/null +++ b/src/frontend/src/icons/Ollama/index.tsx @@ -0,0 +1,9 @@ +import React, { forwardRef } from "react"; +import SvgOllama from "./Ollama"; + +export const OllamaIcon = forwardRef< + SVGSVGElement, + React.PropsWithChildren<{}> +>((props, ref) => { + return ; +}); diff --git a/src/frontend/src/icons/Postgres/Redis.jsx b/src/frontend/src/icons/Postgres/Redis.jsx new file mode 100644 index 000000000..f1063f52b --- /dev/null +++ b/src/frontend/src/icons/Postgres/Redis.jsx @@ -0,0 +1,67 @@ +export const SvgPostgres = (props) => ( + + + + + + + + + + + + + + + + + + + + + + + + + +); +export default SvgPostgres; diff --git a/src/frontend/src/icons/Postgres/Redis.svg b/src/frontend/src/icons/Postgres/Redis.svg new file mode 100644 index 000000000..6075a2b7f --- /dev/null +++ b/src/frontend/src/icons/Postgres/Redis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/frontend/src/icons/Postgres/index.tsx b/src/frontend/src/icons/Postgres/index.tsx new file mode 100644 index 000000000..b7da5264c --- /dev/null +++ b/src/frontend/src/icons/Postgres/index.tsx @@ -0,0 +1,9 @@ +import React, { forwardRef } from "react"; +import SvgPostgres from "./Redis"; + +export const PostgresIcon = forwardRef< + SVGSVGElement, + React.PropsWithChildren<{}> +>((props, ref) => { + return ; +}); diff --git a/src/frontend/src/icons/Redis/Redis.jsx b/src/frontend/src/icons/Redis/Redis.jsx new file mode 100644 index 000000000..1ad7558e2 --- /dev/null +++ b/src/frontend/src/icons/Redis/Redis.jsx @@ -0,0 +1,67 @@ +export const SvgRedis = (props) => ( + + + + + + + + + + + + + + + + + + + + + + + + + +); +export default SvgRedis; diff --git a/src/frontend/src/icons/Redis/Redis.svg b/src/frontend/src/icons/Redis/Redis.svg new file mode 100644 index 000000000..6075a2b7f --- /dev/null +++ b/src/frontend/src/icons/Redis/Redis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/frontend/src/icons/Redis/index.tsx b/src/frontend/src/icons/Redis/index.tsx new file mode 100644 index 000000000..b1624e4a5 --- /dev/null +++ b/src/frontend/src/icons/Redis/index.tsx @@ -0,0 +1,8 @@ +import React, { forwardRef } from "react"; +import { SvgRedis } from "./Redis"; + +export const RedisIcon = forwardRef>( + (props, ref) => { + return ; + } +); diff --git a/src/frontend/src/utils/styleUtils.ts b/src/frontend/src/utils/styleUtils.ts index 2cd74d6d1..1ae649269 100644 --- a/src/frontend/src/utils/styleUtils.ts +++ b/src/frontend/src/utils/styleUtils.ts @@ -128,6 +128,7 @@ import { FaApple, FaGithub } from "react-icons/fa"; import { AWSIcon } from "../icons/AWS"; import { AirbyteIcon } from "../icons/Airbyte"; import { AnthropicIcon } from "../icons/Anthropic"; +import { AzureOpenAiEmbeddingsIcon } from "../icons/AzureOpenAiEmbeddings"; import { BingIcon } from "../icons/Bing"; import { ChromaIcon } from "../icons/ChromaIcon"; import { CohereIcon } from "../icons/Cohere"; @@ -147,9 +148,12 @@ import { MetaIcon } from "../icons/Meta"; import { MidjourneyIcon } from "../icons/Midjorney"; import { MongoDBIcon } from "../icons/MongoDB"; import { NotionIcon } from "../icons/Notion"; +import { OllamaIcon } from "../icons/Ollama"; import { OpenAiIcon } from "../icons/OpenAi"; import { PineconeIcon } from "../icons/Pinecone"; +import { PostgresIcon } from "../icons/Postgres"; import { QDrantIcon } from "../icons/QDrant"; +import { RedisIcon } from "../icons/Redis"; import { SearxIcon } from "../icons/Searx"; import { ShareIcon } from "../icons/Share"; import { Share2Icon } from "../icons/Share2"; @@ -252,6 +256,18 @@ export const nodeNames: { [char: string]: string } = { }; export const nodeIconsLucide: iconsType = { + AzureChatOpenAi: AzureOpenAiEmbeddingsIcon, + Ollama: OllamaIcon, + ChatOllama: OllamaIcon, + AzureOpenAiEmbeddings: AzureOpenAiEmbeddingsIcon, + OllamaEmbeddings: OllamaIcon, + ChatOllamaModel: OllamaIcon, + Faiss: MetaIcon, + FaissSearch: MetaIcon, + AzureOpenAiModel: AzureOpenAiEmbeddingsIcon, + Redis: RedisIcon, + RedisSearch: RedisIcon, + PostgresChatMessageHistory: PostgresIcon, Play, Vectara: VectaraIcon, ArrowUpToLine: ArrowUpToLine, @@ -280,7 +296,7 @@ export const nodeIconsLucide: iconsType = { Meta: MetaIcon, Midjorney: MidjourneyIcon, MongoDBAtlasVectorSearch: MongoDBIcon, - MongoDB:MongoDBIcon, + MongoDB: MongoDBIcon, MongoDBChatMessageHistory: MongoDBIcon, NotionDirectoryLoader: NotionIcon, ChatOpenAI: OpenAiIcon, From 68434820b09ee2a2005d648fb75f648b4cfdc4c5 Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Wed, 28 Feb 2024 23:08:43 -0300 Subject: [PATCH 2/5] add postgres icon --- src/frontend/src/icons/Postgres/Postgres.jsx | 67 +++++++++++++++++++ .../Postgres/{Redis.svg => Postgres.svg} | 0 src/frontend/src/icons/Postgres/Redis.jsx | 67 ------------------- src/frontend/src/icons/Postgres/index.tsx | 2 +- src/frontend/src/utils/styleUtils.ts | 3 +- 5 files changed, 70 insertions(+), 69 deletions(-) create mode 100644 src/frontend/src/icons/Postgres/Postgres.jsx rename src/frontend/src/icons/Postgres/{Redis.svg => Postgres.svg} (100%) delete mode 100644 src/frontend/src/icons/Postgres/Redis.jsx diff --git a/src/frontend/src/icons/Postgres/Postgres.jsx b/src/frontend/src/icons/Postgres/Postgres.jsx new file mode 100644 index 000000000..95059e729 --- /dev/null +++ b/src/frontend/src/icons/Postgres/Postgres.jsx @@ -0,0 +1,67 @@ +export const SvgPostgres = (props) => ( + + + + + + + + + + + + + + + + + + + + + + + + + +); +export default SvgPostgres; diff --git a/src/frontend/src/icons/Postgres/Redis.svg b/src/frontend/src/icons/Postgres/Postgres.svg similarity index 100% rename from src/frontend/src/icons/Postgres/Redis.svg rename to src/frontend/src/icons/Postgres/Postgres.svg diff --git a/src/frontend/src/icons/Postgres/Redis.jsx b/src/frontend/src/icons/Postgres/Redis.jsx deleted file mode 100644 index f1063f52b..000000000 --- a/src/frontend/src/icons/Postgres/Redis.jsx +++ /dev/null @@ -1,67 +0,0 @@ -export const SvgPostgres = (props) => ( - - - - - - - - - - - - - - - - - - - - - - - - - -); -export default SvgPostgres; diff --git a/src/frontend/src/icons/Postgres/index.tsx b/src/frontend/src/icons/Postgres/index.tsx index b7da5264c..0bd7cdaef 100644 --- a/src/frontend/src/icons/Postgres/index.tsx +++ b/src/frontend/src/icons/Postgres/index.tsx @@ -1,5 +1,5 @@ import React, { forwardRef } from "react"; -import SvgPostgres from "./Redis"; +import SvgPostgres from "./Postgres"; export const PostgresIcon = forwardRef< SVGSVGElement, diff --git a/src/frontend/src/utils/styleUtils.ts b/src/frontend/src/utils/styleUtils.ts index 1ae649269..2826e23c2 100644 --- a/src/frontend/src/utils/styleUtils.ts +++ b/src/frontend/src/utils/styleUtils.ts @@ -124,7 +124,7 @@ import { XCircle, Zap, } from "lucide-react"; -import { FaApple, FaGithub } from "react-icons/fa"; +import { FaApple, FaGithub, FaRobot } from "react-icons/fa"; import { AWSIcon } from "../icons/AWS"; import { AirbyteIcon } from "../icons/Airbyte"; import { AnthropicIcon } from "../icons/Anthropic"; @@ -268,6 +268,7 @@ export const nodeIconsLucide: iconsType = { Redis: RedisIcon, RedisSearch: RedisIcon, PostgresChatMessageHistory: PostgresIcon, + BaiduQianfan: FaRobot, Play, Vectara: VectaraIcon, ArrowUpToLine: ArrowUpToLine, From 0856aacebfd32badb3980f21427601cb762bd76a Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Wed, 28 Feb 2024 23:17:03 -0300 Subject: [PATCH 3/5] add postgres svg icon --- src/frontend/src/icons/Postgres/Postgres.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/icons/Postgres/Postgres.svg b/src/frontend/src/icons/Postgres/Postgres.svg index 6075a2b7f..d8c30acf8 100644 --- a/src/frontend/src/icons/Postgres/Postgres.svg +++ b/src/frontend/src/icons/Postgres/Postgres.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file From 1eacfc49717b2e5d7979128080dd9e234406c8e0 Mon Sep 17 00:00:00 2001 From: cristhianzl Date: Thu, 29 Feb 2024 16:08:30 -0300 Subject: [PATCH 4/5] add azure icon --- src/frontend/src/icons/Azure/Azure.jsx | 61 +++++++++++++++++ src/frontend/src/icons/Azure/index.tsx | 8 +++ .../AzureOpenAiEmbeddings/AzureChatOpenAi.jsx | 67 ------------------- .../AzureOpenAiEmbeddings/AzureChatOpenAi.svg | 1 - .../src/icons/AzureOpenAiEmbeddings/index.tsx | 9 --- src/frontend/src/utils/styleUtils.ts | 9 +-- 6 files changed, 74 insertions(+), 81 deletions(-) create mode 100644 src/frontend/src/icons/Azure/Azure.jsx create mode 100644 src/frontend/src/icons/Azure/index.tsx delete mode 100644 src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.jsx delete mode 100644 src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.svg delete mode 100644 src/frontend/src/icons/AzureOpenAiEmbeddings/index.tsx diff --git a/src/frontend/src/icons/Azure/Azure.jsx b/src/frontend/src/icons/Azure/Azure.jsx new file mode 100644 index 000000000..644fdd9f8 --- /dev/null +++ b/src/frontend/src/icons/Azure/Azure.jsx @@ -0,0 +1,61 @@ +export const SvgAzure = (props) => ( + + + + + + + + + + + + + + + + + + + + + + +); +export default SvgAzure; diff --git a/src/frontend/src/icons/Azure/index.tsx b/src/frontend/src/icons/Azure/index.tsx new file mode 100644 index 000000000..346868ab4 --- /dev/null +++ b/src/frontend/src/icons/Azure/index.tsx @@ -0,0 +1,8 @@ +import React, { forwardRef } from "react"; +import SvgAzure from "./Azure"; + +export const AzureIcon = forwardRef>( + (props, ref) => { + return ; + } +); diff --git a/src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.jsx b/src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.jsx deleted file mode 100644 index 0030169f8..000000000 --- a/src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.jsx +++ /dev/null @@ -1,67 +0,0 @@ -export const SvgAzureChatOpenAi = (props) => ( - - - - - - - - - - - - - - - - - - - - - - - - - -); -export default SvgAzureChatOpenAi; diff --git a/src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.svg b/src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.svg deleted file mode 100644 index cb695fac2..000000000 --- a/src/frontend/src/icons/AzureOpenAiEmbeddings/AzureChatOpenAi.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/frontend/src/icons/AzureOpenAiEmbeddings/index.tsx b/src/frontend/src/icons/AzureOpenAiEmbeddings/index.tsx deleted file mode 100644 index 2444d32b0..000000000 --- a/src/frontend/src/icons/AzureOpenAiEmbeddings/index.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React, { forwardRef } from "react"; -import SvgAzureChatOpenAi from "./AzureChatOpenAi"; - -export const AzureOpenAiEmbeddingsIcon = forwardRef< - SVGSVGElement, - React.PropsWithChildren<{}> ->((props, ref) => { - return ; -}); diff --git a/src/frontend/src/utils/styleUtils.ts b/src/frontend/src/utils/styleUtils.ts index 2826e23c2..08b4a12c4 100644 --- a/src/frontend/src/utils/styleUtils.ts +++ b/src/frontend/src/utils/styleUtils.ts @@ -128,7 +128,7 @@ import { FaApple, FaGithub, FaRobot } from "react-icons/fa"; import { AWSIcon } from "../icons/AWS"; import { AirbyteIcon } from "../icons/Airbyte"; import { AnthropicIcon } from "../icons/Anthropic"; -import { AzureOpenAiEmbeddingsIcon } from "../icons/AzureOpenAiEmbeddings"; +import { AzureIcon } from "../icons/Azure"; import { BingIcon } from "../icons/Bing"; import { ChromaIcon } from "../icons/ChromaIcon"; import { CohereIcon } from "../icons/Cohere"; @@ -256,15 +256,16 @@ export const nodeNames: { [char: string]: string } = { }; export const nodeIconsLucide: iconsType = { - AzureChatOpenAi: AzureOpenAiEmbeddingsIcon, + AzureChatOpenAi: AzureIcon, Ollama: OllamaIcon, ChatOllama: OllamaIcon, - AzureOpenAiEmbeddings: AzureOpenAiEmbeddingsIcon, + AzureOpenAiEmbeddings: AzureIcon, + Azure: AzureIcon, OllamaEmbeddings: OllamaIcon, ChatOllamaModel: OllamaIcon, Faiss: MetaIcon, FaissSearch: MetaIcon, - AzureOpenAiModel: AzureOpenAiEmbeddingsIcon, + AzureOpenAiModel: AzureIcon, Redis: RedisIcon, RedisSearch: RedisIcon, PostgresChatMessageHistory: PostgresIcon, From 02b1f89555726944382176e18b1bf4c972d92b1e Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Thu, 29 Feb 2024 17:28:09 -0300 Subject: [PATCH 5/5] Add Azure icon to AzureOpenAIEmbeddingsComponent and AzureChatOpenAISpecsComponent --- .../langflow/components/embeddings/AzureOpenAIEmbeddings.py | 1 + .../langflow/components/model_specs/AzureChatOpenAISpecs.py | 1 + .../src/pages/FlowPage/components/PageComponent/index.tsx | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/components/embeddings/AzureOpenAIEmbeddings.py b/src/backend/langflow/components/embeddings/AzureOpenAIEmbeddings.py index 09b03e17b..a44259be9 100644 --- a/src/backend/langflow/components/embeddings/AzureOpenAIEmbeddings.py +++ b/src/backend/langflow/components/embeddings/AzureOpenAIEmbeddings.py @@ -9,6 +9,7 @@ class AzureOpenAIEmbeddingsComponent(CustomComponent): description: str = "Embeddings model from Azure OpenAI." documentation: str = "https://python.langchain.com/docs/integrations/text_embedding/azureopenai" beta = False + icon = "Azure" API_VERSION_OPTIONS = [ "2022-12-01", diff --git a/src/backend/langflow/components/model_specs/AzureChatOpenAISpecs.py b/src/backend/langflow/components/model_specs/AzureChatOpenAISpecs.py index 6bf9a32af..e6e1b5da5 100644 --- a/src/backend/langflow/components/model_specs/AzureChatOpenAISpecs.py +++ b/src/backend/langflow/components/model_specs/AzureChatOpenAISpecs.py @@ -11,6 +11,7 @@ class AzureChatOpenAISpecsComponent(CustomComponent): description: str = "LLM model from Azure OpenAI." documentation: str = "https://python.langchain.com/docs/integrations/llms/azure_openai" beta = False + icon = "Azure" AZURE_OPENAI_MODELS = [ "gpt-35-turbo", diff --git a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx index 8c3f99c46..3cabb9b64 100644 --- a/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/PageComponent/index.tsx @@ -472,4 +472,4 @@ export default function Page({ ); -} +} \ No newline at end of file