Add AstraDB icon and field order to AstraDBVectorStoreComponent and AstraDBSearchComponent
This commit is contained in:
parent
395f75f5bd
commit
569d384573
6 changed files with 43 additions and 0 deletions
|
|
@ -10,6 +10,8 @@ from langflow.schema import Record
|
||||||
class AstraDBVectorStoreComponent(CustomComponent):
|
class AstraDBVectorStoreComponent(CustomComponent):
|
||||||
display_name = "AstraDB Vector Store"
|
display_name = "AstraDB Vector Store"
|
||||||
description = "Builds or loads an AstraDB Vector Store"
|
description = "Builds or loads an AstraDB Vector Store"
|
||||||
|
icon = "AstraDB"
|
||||||
|
field_order = ["token", "api_endpoint", "collection_name", "inputs", "embedding"]
|
||||||
|
|
||||||
def build_config(self):
|
def build_config(self):
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ from langflow.schema import Record
|
||||||
class AstraDBSearchComponent(AstraDBVectorStoreComponent, LCVectorStoreComponent):
|
class AstraDBSearchComponent(AstraDBVectorStoreComponent, LCVectorStoreComponent):
|
||||||
display_name = "AstraDB Search"
|
display_name = "AstraDB Search"
|
||||||
description = "Searches an existing AstraDB Vector Store"
|
description = "Searches an existing AstraDB Vector Store"
|
||||||
|
icon = "AstraDB"
|
||||||
|
field_order = ["token", "api_endpoint", "collection_name", "input_value", "embedding"]
|
||||||
|
|
||||||
def build_config(self):
|
def build_config(self):
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
16
src/frontend/src/icons/AstraDB/AstraDB.jsx
Normal file
16
src/frontend/src/icons/AstraDB/AstraDB.jsx
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
const AstraSVG = (props) => (
|
||||||
|
<svg width="96" height="96" viewBox="12 33 72 29" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
||||||
|
<g clip-path="url(#clip0_702_1449)">
|
||||||
|
{/* <rect width="96" height="96" rx="6" fill="white"/> */}
|
||||||
|
<path d="M38.0469 33H12V62.1892H38.0469L44.5902 57.1406V38.0485L38.0469 33ZM17.0478 38.0485H39.5424V57.1459H17.0478V38.0485Z" fill="black"/>
|
||||||
|
<path d="M82.0705 38.2605V33.3243H58.2546L51.788 38.2605V45.038L58.2546 49.9742H79.0107V56.9286H53.076V61.8648H77.5334L84 56.9286V49.9742L77.5334 45.038H56.7772V38.2605H82.0705Z" fill="black"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_702_1449">
|
||||||
|
<rect width="96" height="96" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
);
|
||||||
|
export default AstraSVG;
|
||||||
12
src/frontend/src/icons/AstraDB/Favicon.svg
Normal file
12
src/frontend/src/icons/AstraDB/Favicon.svg
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_702_1449)">
|
||||||
|
<rect width="96" height="96" rx="6" fill="white"/>
|
||||||
|
<path d="M38.0469 33H12V62.1892H38.0469L44.5902 57.1406V38.0485L38.0469 33ZM17.0478 38.0485H39.5424V57.1459H17.0478V38.0485Z" fill="black"/>
|
||||||
|
<path d="M82.0705 38.2605V33.3243H58.2546L51.788 38.2605V45.038L58.2546 49.9742H79.0107V56.9286H53.076V61.8648H77.5334L84 56.9286V49.9742L77.5334 45.038H56.7772V38.2605H82.0705Z" fill="black"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_702_1449">
|
||||||
|
<rect width="96" height="96" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 645 B |
9
src/frontend/src/icons/AstraDB/index.tsx
Normal file
9
src/frontend/src/icons/AstraDB/index.tsx
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
import React, { forwardRef } from "react";
|
||||||
|
import AstraSVG from "./AstraDB";
|
||||||
|
|
||||||
|
export const AstraDBIcon = forwardRef<
|
||||||
|
SVGSVGElement,
|
||||||
|
React.PropsWithChildren<{}>
|
||||||
|
>((props, ref) => {
|
||||||
|
return <AstraSVG ref={ref} {...props} />;
|
||||||
|
});
|
||||||
|
|
@ -138,6 +138,7 @@ import { FaApple, FaGithub } from "react-icons/fa";
|
||||||
import { AWSIcon } from "../icons/AWS";
|
import { AWSIcon } from "../icons/AWS";
|
||||||
import { AirbyteIcon } from "../icons/Airbyte";
|
import { AirbyteIcon } from "../icons/Airbyte";
|
||||||
import { AnthropicIcon } from "../icons/Anthropic";
|
import { AnthropicIcon } from "../icons/Anthropic";
|
||||||
|
import { AstraDBIcon } from "../icons/AstraDB";
|
||||||
import { AzureIcon } from "../icons/Azure";
|
import { AzureIcon } from "../icons/Azure";
|
||||||
import { BingIcon } from "../icons/Bing";
|
import { BingIcon } from "../icons/Bing";
|
||||||
import { BotMessageSquareIcon } from "../icons/BotMessageSquare";
|
import { BotMessageSquareIcon } from "../icons/BotMessageSquare";
|
||||||
|
|
@ -311,6 +312,7 @@ export const nodeIconsLucide: iconsType = {
|
||||||
Amazon: AWSIcon,
|
Amazon: AWSIcon,
|
||||||
Anthropic: AnthropicIcon,
|
Anthropic: AnthropicIcon,
|
||||||
ChatAnthropic: AnthropicIcon,
|
ChatAnthropic: AnthropicIcon,
|
||||||
|
AstraDB: AstraDBIcon,
|
||||||
BingSearchAPIWrapper: BingIcon,
|
BingSearchAPIWrapper: BingIcon,
|
||||||
BingSearchRun: BingIcon,
|
BingSearchRun: BingIcon,
|
||||||
Cohere: CohereIcon,
|
Cohere: CohereIcon,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue