-
Notifications
You must be signed in to change notification settings - Fork 8.2k
feat: add BurnCloud provider metadata and assets #10571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ka1i
wants to merge
8
commits into
langflow-ai:main
Choose a base branch
from
iXaydaYun:burncloud
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+353
−1
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ac77896
feat: add BurnCloud provider metadata and assets
ka1i f1634e2
fix: add dark mode support and unique gradient ID to BurnCloud icon
ka1i 58875a8
Merge branch 'main' into burncloud
ka1i df511d7
Merge branch 'main' into burncloud
ka1i c63c31f
Merge branch 'main' into burncloud
ka1i 7f9f280
Merge branch 'main' into burncloud
ka1i 333b28c
Merge branch 'main' into burncloud
ka1i 0a2d254
Merge branch 'main' into burncloud
ka1i File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| --- | ||
| title: BurnCloud | ||
| slug: /bundles-burncloud | ||
| description: Use BurnCloud's OpenAI-compatible models inside Langflow. | ||
| --- | ||
|
|
||
| import Icon from "@site/src/components/icon"; | ||
|
|
||
| <Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow. | ||
|
|
||
| This page describes the components that are available in the **BurnCloud** bundle. | ||
|
|
||
| For more information about BurnCloud features and API limits, see the [BurnCloud documentation](https://burncloud.com/). | ||
|
|
||
| ## BurnCloud text generation | ||
|
|
||
| The **BurnCloud** component generates text through BurnCloud's OpenAI-compatible API gateway. It works with the same chat-completions schema as OpenAI, while letting you point to BurnCloud-hosted models or a private BurnCloud deployment. | ||
|
|
||
| It can output either a **Model Response** ([`Message`](/data-types#message)) or a **Language Model** ([`LanguageModel`](/data-types#languagemodel)). The **Language Model** output is an instance of [`ChatOpenAI`](https://python.langchain.com/docs/integrations/chat/openai) configured to target BurnCloud's `/v1` endpoints. | ||
|
|
||
| Use the **Language Model** output when you want to pass a BurnCloud model into another LLM-driven component, such as **Agent**, **Smart Function**, or **Prompt Template** components. | ||
|
|
||
| ### BurnCloud parameters | ||
|
|
||
| import PartialParams from '@site/docs/_partial-hidden-params.mdx'; | ||
|
|
||
| <PartialParams /> | ||
|
|
||
| | Name | Type | Description | | ||
| |------|------|-------------| | ||
| | api_key | SecretString | Input parameter. Your BurnCloud API key. Required for authentication and for fetching the latest model list. | | ||
| | base_url | String | Input parameter. Override the default `https://ai.burncloud.com` base URL if you host BurnCloud privately. The component appends `/v1` automatically when needed. (Advanced) | | ||
| | model_name | String | Input parameter. BurnCloud model to use. Options update dynamically after you provide a valid API key and click <Icon name="RefreshCw" aria-hidden="true" /> **Refresh**. Defaults to `gpt-4o`. | | ||
| | temperature | Float | Input parameter. Controls randomness. Range: `[0, 2]`. Defaults to `0.7`. (Advanced) | | ||
| | top_p | Float | Input parameter. Alternative sampling control that limits the cumulative probability mass of candidate tokens. Range: `[0, 1]`. Defaults to `1.0`. (Advanced) | | ||
| | max_tokens | Integer | Input parameter. Maximum number of tokens to generate. Leave empty to let BurnCloud decide. (Advanced) | | ||
| | input_value | String | Input parameter. The prompt or chat content you want to send to the model. | | ||
| | system_message | String | Input parameter. Sets the assistant's persona or high-level instructions. | | ||
| | stream | Boolean | Input parameter. Streams partial results when enabled. | | ||
| | output_parser | OutputParser | Input parameter. (Advanced) Parse the model response before passing it downstream. | | ||
| | model_output | LanguageModel | Output parameter. A `ChatOpenAI` instance configured for BurnCloud. | | ||
| | text_output | Message | Output parameter. The generated response from the selected BurnCloud model. | | ||
|
|
||
| ### Use BurnCloud in a flow | ||
|
|
||
| 1. Sign up for a [BurnCloud account](https://burncloud.com/) and generate an API key in the BurnCloud dashboard. | ||
| 2. In Langflow, open <Icon name="Blocks" aria-hidden="true" /> **Bundles** and drag the **BurnCloud** component into your flow. | ||
| 3. Paste your API key into **BurnCloud API Key**. Optionally set **Base URL** if your organization hosts BurnCloud privately. | ||
| 4. Click <Icon name="RefreshCw" aria-hidden="true" /> **Refresh** next to **Model** to load the latest BurnCloud-hosted model list, then pick the model you need. | ||
| 5. Configure sampling parameters such as **Temperature**, **Top P**, and **Max Output Tokens** (if required) along with your **System Message** and **Prompt**. | ||
| 6. Connect **Chat Input** → **BurnCloud** → **Chat Output** (or feed the **Language Model** output into downstream components like **Agent** or **Smart Function**). | ||
| 7. Click **Playground** to test requests and validate the connection before deploying the flow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import { useId } from "react"; | ||
|
|
||
| const BurnCloudIconSVG = ({ isDark = false, ...props }) => { | ||
| const gradientId = `burncloud-gradient-${useId()}`; | ||
| const start = isDark ? "#f9cf69" : "#f7b52c"; | ||
| const end = isDark ? "#ff7a3a" : "#e95513"; | ||
| return ( | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| viewBox="0 0 24 24" | ||
| role="img" | ||
| aria-label="BurnCloud icon" | ||
| fill="none" | ||
| focusable="false" | ||
| {...props} | ||
| > | ||
| <defs> | ||
| <linearGradient | ||
| id={gradientId} | ||
| x2="1" | ||
| gradientUnits="userSpaceOnUse" | ||
| gradientTransform="matrix(-0.04 9.248 -11.433 -0.05 12.058 8.618)" | ||
| > | ||
| <stop offset="0" stopColor={start} /> | ||
| <stop offset="1" stopColor={end} /> | ||
| </linearGradient> | ||
| </defs> | ||
| <path | ||
| fill={`url(#${gradientId})`} | ||
| d="M17.8 10.1c-.6-.9-1.4-1.9-1.4-1.9s-1.8-2.1-1.5-5.2c0 0-6.9 2.7-7 8.2 0 0-1-1.6-.8-4.6 0 0-2.2 2.1-2.5 5.5-2.1.7-3.8 2.5-3.8 4.3 0 2.5 2.7 4.6 5.9 4.6-2.4-.4-4.2-2-4.2-4 0-1.4.8-2.5 2-3.3.1 1.1.5 2.4.5 2.4s1.2 3.8 5.4 4.8a6.8 6.8 0 0 0 3.7-.3c1.3-.6 2.8-1.8 2.8-4.5 0 0 .1-2.7-1.5-4.1 0 0 2.1 5-1.8 6.5a4.8 4.8 0 0 1-3.9 0c-1.7-.7-3.8-2.5-3.5-7.2 0 0 1 3.4 3.2 4.7 0 0-2-5.8 3.9-9.8 0 0 .5 2.1 1.9 3.3.4.4 4 3.2 3.3 8 .7-.9 1.3-3.1.7-4.8 0 0-.1-.4-.4-.9 1.5.3 2.7 1.5 2.8 4.2.1 2.3-1.6 4.2-3.8 5 3-.4 5.4-2.7 5.4-5.6 0-2.8-2.2-5.1-5.4-5.3Z" | ||
| /> | ||
| </svg> | ||
| ); | ||
| }; | ||
|
|
||
| export default BurnCloudIconSVG; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import type React from "react"; | ||
| import { forwardRef } from "react"; | ||
| import BurnCloudIconSVG from "./BurnCloudIcon"; | ||
|
|
||
| export const BurnCloudIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( | ||
| (props, ref) => <BurnCloudIconSVG ref={ref} {...props} />, | ||
| ); | ||
|
|
||
| export default BurnCloudIcon; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from typing import TYPE_CHECKING, Any | ||
|
|
||
| from lfx.components._importing import import_mod | ||
|
|
||
| if TYPE_CHECKING: # pragma: no cover | ||
| from .burncloud import BurnCloudModel | ||
|
|
||
| _dynamic_imports = { | ||
| "BurnCloudModel": "burncloud", | ||
| } | ||
|
|
||
| __all__ = ["BurnCloudModel"] | ||
|
|
||
|
|
||
| def __getattr__(attr_name: str) -> Any: | ||
| """Lazily import BurnCloud components on attribute access.""" | ||
| if attr_name not in _dynamic_imports: | ||
| msg = f"module '{__name__}' has no attribute '{attr_name}'" | ||
| raise AttributeError(msg) | ||
| try: | ||
| result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent) | ||
| except (ModuleNotFoundError, ImportError, AttributeError) as e: # pragma: no cover - thin wrapper | ||
| msg = f"Could not import '{attr_name}' from '{__name__}': {e}" | ||
| raise AttributeError(msg) from e | ||
| globals()[attr_name] = result | ||
| return result | ||
|
|
||
|
|
||
| def __dir__() -> list[str]: # pragma: no cover | ||
| return list(__all__) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.