feat: add new model provider Novita AI (#5380)

* feat: add new model provider Novita AI

* [autofix.ci] apply automated fixes

* fix: code format fix

* fix: code format fix

* fix: fix default Novita AI models

* [autofix.ci] apply automated fixes

* feat: Add real-time refresh for Novita API key and include it in VARIABLES_TO_GET_FROM_ENVIRONMENT

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
Jason 2025-01-20 20:53:28 +08:00 • committed by GitHub
commit 84c6ed2217
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 245 additions and 0 deletions

View file

@ -0,0 +1,9 @@
import React, { forwardRef } from "react";
import SvgNovita from "./novita";
export const NovitaIcon = forwardRef<
SVGSVGElement,
React.PropsWithChildren<{}>
>((props, ref) => {
return <SvgNovita ref={ref} {...props} />;
});

View file

@ -0,0 +1,36 @@
const SvgNovita = (props) => (
<svg
width="22"
height="25"
viewBox="0 0 22 25"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M2 0.66449C0.895431 0.66449 0 1.55992 0 2.66449V20.0552C0 21.1598 0.895432 22.0552 2 22.0552H3.78015L10.5909 24.6045C11.2445 24.8492 11.9414 24.366 11.9414 23.668V8.8959C11.9414 8.06203 11.424 7.31567 10.6432 7.02307L3.78015 4.45137H17.5438V22.0552H19.3239C20.4285 22.0552 21.3239 21.1598 21.3239 20.0552V2.66449C21.3239 1.55992 20.4285 0.66449 19.324 0.66449H2ZM10.0128 16.943C10.3239 17.0945 10.5764 16.906 10.5764 16.5201C10.5764 16.1341 10.3239 15.6984 10.0128 15.5469C9.70171 15.3946 9.44922 15.5846 9.44922 15.9698C9.44922 16.355 9.70171 16.7907 10.0128 16.943Z"
fill="white"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M2 0.66449C0.895431 0.66449 0 1.55992 0 2.66449V20.0552C0 21.1598 0.895432 22.0552 2 22.0552H3.78015L10.5909 24.6045C11.2445 24.8492 11.9414 24.366 11.9414 23.668V8.8959C11.9414 8.06203 11.424 7.31567 10.6432 7.02307L3.78015 4.45137H17.5438V22.0552H19.3239C20.4285 22.0552 21.3239 21.1598 21.3239 20.0552V2.66449C21.3239 1.55992 20.4285 0.66449 19.324 0.66449H2ZM10.0128 16.943C10.3239 17.0945 10.5764 16.906 10.5764 16.5201C10.5764 16.1341 10.3239 15.6984 10.0128 15.5469C9.70171 15.3946 9.44922 15.5846 9.44922 15.9698C9.44922 16.355 9.70171 16.7907 10.0128 16.943Z"
fill="url(#paint0_linear_83_9227)"
/>
<defs>
<linearGradient
id="paint0_linear_83_9227"
x1="21.1236"
y1="-0.699318"
x2="0.585556"
y2="10.4891"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="#2622FF" />
<stop offset="1" stop-color="#A717FF" />
</linearGradient>
</defs>
</svg>
);
export default SvgNovita;

View file

@ -0,0 +1,10 @@
<svg width="22" height="25" viewBox="0 0 22 25" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 0.66449C0.895431 0.66449 0 1.55992 0 2.66449V20.0552C0 21.1598 0.895432 22.0552 2 22.0552H3.78015L10.5909 24.6045C11.2445 24.8492 11.9414 24.366 11.9414 23.668V8.8959C11.9414 8.06203 11.424 7.31567 10.6432 7.02307L3.78015 4.45137H17.5438V22.0552H19.3239C20.4285 22.0552 21.3239 21.1598 21.3239 20.0552V2.66449C21.3239 1.55992 20.4285 0.66449 19.324 0.66449H2ZM10.0128 16.943C10.3239 17.0945 10.5764 16.906 10.5764 16.5201C10.5764 16.1341 10.3239 15.6984 10.0128 15.5469C9.70171 15.3946 9.44922 15.5846 9.44922 15.9698C9.44922 16.355 9.70171 16.7907 10.0128 16.943Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 0.66449C0.895431 0.66449 0 1.55992 0 2.66449V20.0552C0 21.1598 0.895432 22.0552 2 22.0552H3.78015L10.5909 24.6045C11.2445 24.8492 11.9414 24.366 11.9414 23.668V8.8959C11.9414 8.06203 11.424 7.31567 10.6432 7.02307L3.78015 4.45137H17.5438V22.0552H19.3239C20.4285 22.0552 21.3239 21.1598 21.3239 20.0552V2.66449C21.3239 1.55992 20.4285 0.66449 19.324 0.66449H2ZM10.0128 16.943C10.3239 17.0945 10.5764 16.906 10.5764 16.5201C10.5764 16.1341 10.3239 15.6984 10.0128 15.5469C9.70171 15.3946 9.44922 15.5846 9.44922 15.9698C9.44922 16.355 9.70171 16.7907 10.0128 16.943Z" fill="url(#paint0_linear_83_9227)"/>
<defs>
<linearGradient id="paint0_linear_83_9227" x1="21.1236" y1="-0.699318" x2="0.585556" y2="10.4891" gradientUnits="userSpaceOnUse">
<stop stop-color="#2622FF"/>
<stop offset="1" stop-color="#A717FF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -281,6 +281,7 @@ import { MongoDBIcon } from "../icons/MongoDB";
import { NeedleIcon } from "../icons/Needle";
import { NotDiamondIcon } from "../icons/NotDiamond";
import { NotionIcon } from "../icons/Notion";
import { NovitaIcon } from "../icons/Novita";
import { NvidiaIcon } from "../icons/Nvidia";
import { OllamaIcon } from "../icons/Ollama";
import { OpenAiIcon } from "../icons/OpenAi";
@ -666,6 +667,8 @@ export const nodeIconsLucide: iconsType = {
notion: NotionIcon,
Notion: NotionIcon,
NotionDirectoryLoader: NotionIcon,
novita: NovitaIcon,
Novita: NovitaIcon,
Needle: NeedleIcon,
NVIDIA: NvidiaIcon,
ChatOpenAI: OpenAiIcon,