Skip to content
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

Add Google Gemini Component, improvements and bugfixes #1243

Merged
merged 228 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
228 commits
Select commit Hold shift + click to select a range
d9bae37
add cdk scripts
Nov 20, 2023
576b62e
modified: dockerignore for cdk
Nov 20, 2023
a7834ca
modified: conflicts
Nov 20, 2023
fe08651
modified: Dockerfile for cdk
Nov 20, 2023
22b7032
add curl
Nov 20, 2023
d1a6567
modified: backend dockerfile
Nov 20, 2023
1f4a874
modify: poetry lock file
Nov 20, 2023
f2ad6a2
modified: frontend cloudMap
Nov 21, 2023
5250f14
modified port
Nov 21, 2023
58726b1
set env to backend
Nov 21, 2023
5d75376
update cdk code
Nov 21, 2023
dcf2759
add: delete docker images sh
Nov 21, 2023
a9ebac0
add: Bedrock Kendra policy statement
Nov 21, 2023
0e76771
add portMapping name option
Nov 21, 2023
7a7f92e
add portMapping hostport
Nov 21, 2023
aa44214
modified: hostport setting
Nov 21, 2023
9daee4c
remove npm update
Nov 23, 2023
b4101c2
set window.host and alembic.ini
Nov 23, 2023
ca8c0d8
modify BACKEND_URL
Nov 23, 2023
e34c561
modify task memory and cpu
Nov 23, 2023
9e8906e
modify cpu
Nov 23, 2023
2b2d8f3
modify LANGFLOW_DATABASE_URL
Nov 23, 2023
284ed0c
add: iam construct
Nov 23, 2023
0695a44
add: iam construct
Nov 23, 2023
422489c
add: iam construct
Nov 23, 2023
b048db6
add: iam construct
Nov 23, 2023
ca723d6
add RAG policy to TaskExeRole
Nov 24, 2023
90759fe
modify: set_database_url
Nov 26, 2023
6e3c840
modified: add Dependency
Nov 27, 2023
2730dba
use env file
Nov 29, 2023
093d963
move cdk folder to scripts/cdk
Nov 30, 2023
d6d12b4
move cdk folder to scripts/cdk
Nov 30, 2023
b2d5a1d
modify docker-compose
Nov 30, 2023
d7f40cf
本家の踏襲のため、Dockerfileを変更
Nov 30, 2023
979b8e2
Dockerfile等をv0.5.6のものと一緒に
Nov 30, 2023
675e4d6
Dockerfile等をv0.5.6のものと一緒に
Nov 30, 2023
6771757
__main__をv0.5.6のものと一緒に
Nov 30, 2023
238ef6d
install dotenv
Nov 30, 2023
ceee656
dockerignore aws
Nov 30, 2023
fbd29a2
modified: cdk Dockerfile
Dec 1, 2023
7462aa6
modiied docker-compose: use cdk.Dockerfile
Dec 1, 2023
fde4897
add Cfn Output & Readme
Dec 1, 2023
39e09ca
add README
Dec 1, 2023
de1f930
add README
Dec 1, 2023
086c136
add README
Dec 1, 2023
fd84d2a
add README
Dec 1, 2023
60c49f6
add README
Dec 1, 2023
321c046
add README
Dec 1, 2023
f101c63
add archi
Dec 2, 2023
1118958
add archi
Dec 2, 2023
4a70fe4
add archi
Dec 2, 2023
7836f71
add archi
Dec 2, 2023
d18535a
add archi
Dec 2, 2023
54021d3
update readme
Dec 5, 2023
dc6ca00
update readme
Dec 5, 2023
4e06c86
add cdk scripts
Nov 20, 2023
b44c6d0
modified: dockerignore for cdk
Nov 20, 2023
83244bc
modified: conflicts
Nov 20, 2023
8d08260
modified: Dockerfile for cdk
Nov 20, 2023
1492c44
add curl
Nov 20, 2023
7db5f9f
modified: backend dockerfile
Nov 20, 2023
8353df7
modify: poetry lock file
Nov 20, 2023
b49fa15
modified: frontend cloudMap
Nov 21, 2023
b920f50
modified port
Nov 21, 2023
1770aa8
set env to backend
Nov 21, 2023
078951f
update cdk code
Nov 21, 2023
5474505
add: delete docker images sh
Nov 21, 2023
342c920
add: Bedrock Kendra policy statement
Nov 21, 2023
2f9cf68
add portMapping name option
Nov 21, 2023
8b0598e
add portMapping hostport
Nov 21, 2023
826507b
modified: hostport setting
Nov 21, 2023
94eecd1
remove npm update
Nov 23, 2023
8b29554
set window.host and alembic.ini
Nov 23, 2023
fb6645d
modify BACKEND_URL
Nov 23, 2023
f1d7318
modify task memory and cpu
Nov 23, 2023
d4a356a
modify cpu
Nov 23, 2023
70d613d
modify LANGFLOW_DATABASE_URL
Nov 23, 2023
34eac25
add: iam construct
Nov 23, 2023
c97f861
add: iam construct
Nov 23, 2023
33627c0
add: iam construct
Nov 23, 2023
167ff52
add: iam construct
Nov 23, 2023
7bf37cf
add RAG policy to TaskExeRole
Nov 24, 2023
64ecaf6
modify: set_database_url
Nov 26, 2023
4011109
modified: add Dependency
Nov 27, 2023
57c7f67
use env file
Nov 29, 2023
ce19ee5
move cdk folder to scripts/cdk
Nov 30, 2023
14651eb
move cdk folder to scripts/cdk
Nov 30, 2023
0b3abda
modify docker-compose
Nov 30, 2023
b2b38c9
本家の踏襲のため、Dockerfileを変更
Nov 30, 2023
2c36276
Dockerfile等をv0.5.6のものと一緒に
Nov 30, 2023
740d7f5
Dockerfile等をv0.5.6のものと一緒に
Nov 30, 2023
e08dbd5
__main__をv0.5.6のものと一緒に
Nov 30, 2023
68aea2c
install dotenv
Nov 30, 2023
6e7c7da
dockerignore aws
Nov 30, 2023
eca7d40
modified: cdk Dockerfile
Dec 1, 2023
fbb7366
modiied docker-compose: use cdk.Dockerfile
Dec 1, 2023
d5e61dd
add Cfn Output & Readme
Dec 1, 2023
ebf3189
add README
Dec 1, 2023
16e538d
add README
Dec 1, 2023
e02c8fc
add README
Dec 1, 2023
4cd4a64
add README
Dec 1, 2023
04e9e49
add README
Dec 1, 2023
80c75bd
add README
Dec 1, 2023
34f2a77
add archi
Dec 2, 2023
20c82e2
add archi
Dec 2, 2023
afa5b80
add archi
Dec 2, 2023
2bf588e
add archi
Dec 2, 2023
3b94d5c
add archi
Dec 2, 2023
d888da7
update readme
Dec 5, 2023
7541b53
update readme
Dec 5, 2023
43aa1d9
reverted: py file
Dec 6, 2023
51159fc
Set Environment variable by Dockerfile
Dec 7, 2023
1113a4c
modified: match settings with dev
Dec 7, 2023
b2d867e
Add procedure to deploy langflow on AWS (#1177)
ogabrielluiz Dec 7, 2023
e465d25
modified: docker compose
Dec 7, 2023
40664f5
Fix WebSocket host configuration
ogabrielluiz Dec 7, 2023
79c93bc
Refactor database URL handling and add logger
ogabrielluiz Dec 7, 2023
501ba41
Refactor database connection logic in base
ogabrielluiz Dec 7, 2023
1e1e49b
Update database URL in alembic.ini
ogabrielluiz Dec 7, 2023
4e9ef4c
Fix typo in README.md
ogabrielluiz Dec 7, 2023
e9f1f32
Merge branch 'aws-cdk-dev-dockerfile' into aws-cdk-dev2
Dec 8, 2023
4328c18
update README
kazuki306 Dec 9, 2023
fb817dd
Merge branch 'aws-cdk' into aws-cdk-dev2
kazuki306 Dec 9, 2023
53f3d39
Fix procedure to deploy langflow on AWS (#1187)
ogabrielluiz Dec 10, 2023
01c23fd
Merge remote-tracking branch 'origin/dev' into aws-cdk
ogabrielluiz Dec 10, 2023
2fd4553
Commented out the "Stop services" step in the CI
ogabrielluiz Dec 11, 2023
e61277c
Fix typo in README.md
ogabrielluiz Dec 13, 2023
24ec1bc
Remove stale.yml configuration file
ogabrielluiz Dec 13, 2023
24bb1b2
Merge branch 'main' into dev
ogabrielluiz Dec 13, 2023
ca576c1
Add AWS CDK deployment scripts by @kazuki306 (#1193)
ogabrielluiz Dec 13, 2023
c891748
Add python-ffmpeg packages
ogabrielluiz Dec 13, 2023
dd6d510
Merge remote-tracking branch 'origin/main' into dev
ogabrielluiz Dec 13, 2023
94003cf
🐛 fix(utils.py): add support for initializing class objects with a te…
ogabrielluiz Dec 13, 2023
03be55a
feat(pageLayout): add support for displaying a beta icon in the page …
Cristhianzl Dec 13, 2023
8343eca
feat(pageLayout): add support for displaying a beta icon in the page …
Cristhianzl Dec 13, 2023
60fc7c6
refactor(GenericNode): simplify conditional class assignment for the …
Cristhianzl Dec 13, 2023
1a4e4f5
refactor(GenericNode): simplify conditional class assignment for the …
Cristhianzl Dec 13, 2023
b869852
Update dependencies: ffmpeg-python, google-cloud-aiplatform, google-c…
ogabrielluiz Dec 13, 2023
f5c673d
Add Google Generative AI component
ogabrielluiz Dec 14, 2023
cb02ca0
Remove ffmpeg-python package and its dependencies
ogabrielluiz Dec 14, 2023
e212d83
Bump version to 0.6.3 in pyproject.toml
ogabrielluiz Dec 14, 2023
0442c7d
Add "code" field to GoogleGenerativeAIComponent
ogabrielluiz Dec 14, 2023
10c9c95
Fix import error in GoogleGenerativeAI.py
ogabrielluiz Dec 14, 2023
bba6aa7
Adds Google Generative AI Component and other small bugfixes (#1207)
ogabrielluiz Dec 14, 2023
2909fd7
Update dependencies versions in poetry.lock and pyproject.toml
ogabrielluiz Dec 14, 2023
7fdc9bf
Add new code parser and directory reader modules
ogabrielluiz Dec 14, 2023
e7e364b
Add custom component classes and methods
ogabrielluiz Dec 14, 2023
5de717c
Fix CustomComponent get_build_method return value
ogabrielluiz Dec 14, 2023
2d92da6
Add import for warnings module
ogabrielluiz Dec 14, 2023
570822d
Add imports to utils.py
ogabrielluiz Dec 14, 2023
7ec8a6c
Refactor code_parser.py and test_custom_component.py
ogabrielluiz Dec 14, 2023
599bf44
Add support for passing arguments to pytest
ogabrielluiz Dec 14, 2023
e249b9d
Update version to 0.6.3a0 in pyproject.toml
ogabrielluiz Dec 14, 2023
36ebdbf
Update version to 0.6.3a0 in pyproject.toml (#1211)
ogabrielluiz Dec 14, 2023
865c7ce
Update dependencies versions in poetry.lock and pyproject.toml
ogabrielluiz Dec 14, 2023
4fa6956
Update version to 0.6.3a1 in pyproject.toml
ogabrielluiz Dec 14, 2023
a43ece5
Update version to 0.6.3a1 in pyproject.toml (#1212)
ogabrielluiz Dec 14, 2023
4547922
fix(frontend): fix save component test by removing unnecessary steps …
Cristhianzl Dec 14, 2023
6346c68
Cz/tests (#1213)
Cristhianzl Dec 14, 2023
865ac03
Refactor custom component module (#1210)
ogabrielluiz Dec 14, 2023
5c290c0
Pull start_time out of try block
ogabrielluiz Dec 14, 2023
7999b33
Add Prompt type to CustomComponent
ogabrielluiz Dec 15, 2023
f36b6a5
Add support for Runnable objects in generate_result function
ogabrielluiz Dec 17, 2023
2afb0fb
Add support for custom components in langchain_object
ogabrielluiz Dec 17, 2023
60a5578
Refactor flow loading and processing
ogabrielluiz Dec 18, 2023
87f8af1
Add import statements for asyncio and json
ogabrielluiz Dec 18, 2023
2edacce
Add traceback property to AnyIOTaskResult class
ogabrielluiz Dec 18, 2023
826a6d0
Refactor ProcessResponse schema in schemas.py
ogabrielluiz Dec 18, 2023
34e116d
Add process_json endpoint for processing JSON data
ogabrielluiz Dec 18, 2023
96d12b6
Update import statements in memories.py
ogabrielluiz Dec 19, 2023
215a171
Update version to 0.6.3a2 in pyproject.toml
ogabrielluiz Dec 19, 2023
9f12986
Update version to 0.6.3a2 in pyproject.toml (#1225)
ogabrielluiz Dec 19, 2023
3a5320a
Migrated Weaviate to custom component
yassineselmi Dec 19, 2023
843e7a6
Removed Weaviate from config.yaml
yassineselmi Dec 19, 2023
a42cacd
Migrate Weaviate to CustomComponent (#1226)
ogabrielluiz Dec 19, 2023
85fc2c1
Cleanup AgentInitializer component
yassineselmi Dec 19, 2023
4197bd4
Refactor API endpoints and remove unnecessary imports
ogabrielluiz Dec 19, 2023
f5e3952
Update version to 0.6.3a3 in pyproject.toml
ogabrielluiz Dec 19, 2023
de4612d
Update version to 0.6.3a3 in pyproject.toml (#1230)
ogabrielluiz Dec 19, 2023
df443d7
Add pretty-quick package for code formatting
ogabrielluiz Dec 20, 2023
481606e
Add unique constraints to tables
ogabrielluiz Dec 20, 2023
c58837d
Refactor process_graph_data function to use task_service.launch_task …
ogabrielluiz Dec 20, 2023
84f9c34
Else clause for task_result
ogabrielluiz Dec 20, 2023
c4daf50
Add async/await to generate_result function
ogabrielluiz Dec 20, 2023
4751e91
Update langflow worker.py with async_to_sync for generate_result
ogabrielluiz Dec 20, 2023
c8992ef
Update version to 0.6.3a4 in pyproject.toml
ogabrielluiz Dec 20, 2023
cdc823d
Update version to 0.6.3a4 in pyproject.toml (#1232)
ogabrielluiz Dec 20, 2023
1148c65
Update type hints for inputs parameter in process_graph_data and proc…
ogabrielluiz Dec 20, 2023
931a245
Refactor result handling in generate_result function
ogabrielluiz Dec 20, 2023
3586ba8
Refactor process.py: Add import statements and update generate_result…
ogabrielluiz Dec 20, 2023
c5134d2
Update version to 0.6.3a5 in pyproject.toml
ogabrielluiz Dec 20, 2023
b288ae3
Added Azure OpenAI
yassineselmi Dec 20, 2023
28fe098
Added documentation link
yassineselmi Dec 20, 2023
bb9aed5
Update type hints and refactor result handling in process.py (#1234)
ogabrielluiz Dec 20, 2023
abd9c67
Fixed wrong style attribute
yassineselmi Dec 20, 2023
1b4a7dc
Fixed default param value
yassineselmi Dec 20, 2023
60d715f
Lint
yassineselmi Dec 20, 2023
3f7b43d
Rename attributes
yassineselmi Dec 20, 2023
ce48f0c
Cleanup AgentInitializer component (#1229)
ogabrielluiz Dec 20, 2023
1f027c6
Added AzureChatOpenAI Custom Component (#1233)
ogabrielluiz Dec 20, 2023
4a9c750
Refactor process.py to improve code structure and readability
ogabrielluiz Dec 20, 2023
955ef77
Add Redis URL configuration option
ogabrielluiz Dec 21, 2023
cfcfc37
Add temperature parameter to ConversationalAgent
ogabrielluiz Dec 21, 2023
55e9b4b
Add AIMessage support and update Result model
ogabrielluiz Dec 21, 2023
3447416
fix(extraSidebarComponent): update condition to show ExportMemo butto…
Cristhianzl Dec 21, 2023
7d40090
BUGFIX: Issue GITHUB #1227 (#1237)
ogabrielluiz Dec 21, 2023
8306a5b
Remove import validation for typing module
ogabrielluiz Dec 22, 2023
f943ea2
Refactor AgentInitializerComponent to support optional memory parameter
ogabrielluiz Dec 22, 2023
13783c1
Format json file
ogabrielluiz Dec 22, 2023
113861e
Refactor test_custom_component.py
ogabrielluiz Dec 22, 2023
28ff6a8
Fix code formatting and import statements
ogabrielluiz Dec 22, 2023
266bc0d
Format imports
ogabrielluiz Dec 22, 2023
3213c87
Refactor API endpoints and imports
ogabrielluiz Dec 22, 2023
75493bb
Refactor process_inputs function to handle both dict and list inputs
ogabrielluiz Dec 22, 2023
010a045
Update typing imports and add logger import
ogabrielluiz Dec 22, 2023
d07150a
Update worker.py with typing changes
ogabrielluiz Dec 22, 2023
f7ae3ae
Refactor process_inputs function to handle optional inputs and artifacts
ogabrielluiz Dec 22, 2023
232a53a
Update langflow version to 0.6.3a6
ogabrielluiz Dec 22, 2023
b900b6d
Remove validate
ogabrielluiz Dec 22, 2023
3d4b9a8
Refactor imports and update Result model
ogabrielluiz Dec 22, 2023
692a078
Remove unused import and test case
ogabrielluiz Dec 22, 2023
afd1bc0
Refactor code and update dependencies (#1241)
ogabrielluiz Dec 22, 2023
e35b5c0
Add workflow_dispatch to pre-release.yml
ogabrielluiz Dec 22, 2023
e1b01a0
Update commit reference to use GitHub SHA
ogabrielluiz Dec 22, 2023
b8ba344
Update commit message to use 'Set commit to dev'
ogabrielluiz Dec 22, 2023
6a41af6
Update version to 0.6.3a7 in pyproject.toml
ogabrielluiz Dec 22, 2023
cabc70c
Update version to 0.6.3a7 in pyproject.toml (#1242)
ogabrielluiz Dec 22, 2023
ef3f7bb
Update version number in pyproject.toml
ogabrielluiz Dec 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.venv/
.venv/
**/aws
17 changes: 0 additions & 17 deletions .github/stale.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ jobs:
run: docker compose up --exit-code-from tests tests result_backend broker celeryworker db --build
continue-on-error: true

- name: Stop services
run: docker compose down
# - name: Stop services
# run: docker compose down
3 changes: 2 additions & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- dev
paths:
- "pyproject.toml"
workflow_dispatch:

env:
POETRY_VERSION: "1.5.1"
Expand Down Expand Up @@ -40,7 +41,7 @@ jobs:
generateReleaseNotes: true
prerelease: true
tag: v${{ steps.check-version.outputs.version }}
commit: main
commit: dev
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ coverage:
--cov-report xml \
--cov-report term-missing:skip-covered

# allow passing arguments to pytest
tests:
@make install_backend
poetry run pytest tests --instafail

poetry run pytest tests --instafail $(args)
# Use like:

format:
poetry run ruff . --fix
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Each option is detailed below:
- `--install-completion [bash|zsh|fish|powershell|pwsh]`: Installs completion for the specified shell.
- `--show-completion [bash|zsh|fish|powershell|pwsh]`: Shows completion for the specified shell, allowing you to copy it or customize the installation.
- `--backend-only`: This parameter, with a default value of `False`, allows running only the backend server without the frontend. It can also be set using the `LANGFLOW_BACKEND_ONLY` environment variable.
- `store`: This parameter, with a default value of `True`, enables the store features, use `--no-store` to deactivate it. It can be configured using the `LANGFLOW_STORE` environment variable.
- `--store`: This parameter, with a default value of `True`, enables the store features, use `--no-store` to deactivate it. It can be configured using the `LANGFLOW_STORE` environment variable.

These parameters are important for users who need to customize the behavior of Langflow, especially in development or specialized deployment scenarios. You may want to update the documentation to include these parameters for completeness and clarity.

Expand Down
20 changes: 20 additions & 0 deletions cdk.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM --platform=linux/amd64 python:3.10-slim

WORKDIR /app

# Install Poetry
RUN apt-get update && apt-get install gcc g++ curl build-essential postgresql-server-dev-all -y
RUN curl -sSL https://install.python-poetry.org | python3 -
# # Add Poetry to PATH
ENV PATH="${PATH}:/root/.local/bin"
# # Copy the pyproject.toml and poetry.lock files
COPY poetry.lock pyproject.toml ./
# Copy the rest of the application codes
COPY ./ ./

# Install dependencies
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi

RUN poetry add pymysql==1.0.2

CMD ["sh", "./container-cmd-cdk.sh"]
3 changes: 3 additions & 0 deletions container-cmd-cdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export LANGFLOW_DATABASE_URL="mysql+pymysql://${username}:${password}@${host}:3306/${dbname}"
# echo $LANGFLOW_DATABASE_URL
uvicorn --factory src.backend.langflow.main:create_app --host 0.0.0.0 --port 7860 --reload --log-level debug
13 changes: 10 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
version: "3"
networks:
langflow:

services:
backend:
build:
context: ./
dockerfile: ./dev.Dockerfile
env_file:
- .env
ports:
- "7860:7860"
volumes:
- ./:/app
command: bash -c "uvicorn --factory src.backend.langflow.main:create_app --host 0.0.0.0 --port 7860 --reload"

networks:
- langflow
frontend:
build:
context: ./src/frontend
dockerfile: ./dev.Dockerfile
dockerfile: ./cdk.Dockerfile
args:
- BACKEND_URL=http://backend:7860
environment:
- VITE_PROXY_TARGET=http://backend:7860
ports:
- "3000:3000"
- "8080:3000"
volumes:
- ./src/frontend/public:/home/node/app/public
- ./src/frontend/src:/home/node/app/src
- ./src/frontend/package.json:/home/node/app/package.json
restart: on-failure
networks:
- langflow
12 changes: 10 additions & 2 deletions docs/docs/components/custom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The CustomComponent class serves as the foundation for creating custom component
| --------------------------------------------------------- |
| _`str`_, _`int`_, _`float`_, _`bool`_, _`list`_, _`dict`_ |
| _`langflow.field_typing.NestedDict`_ |
| _`langflow.field_typing.Prompt`_ |
| _`langchain.chains.base.Chain`_ |
| _`langchain.PromptTemplate`_ |
| _`langchain.llms.base.BaseLLM`_ |
Expand All @@ -48,10 +49,17 @@ The CustomComponent class serves as the foundation for creating custom component
The difference between _`dict`_ and _`langflow.field_typing.NestedDict`_ is that one adds a simple key-value pair field, while the other opens a more robust dictionary editor.

<Admonition type="info">
Unlike Langchain types, base Python types do not add a
To use the _`Prompt`_ type, you must also add _`**kwargs`_ to the _`build`_ method. This is because the _`Prompt`_ type passes new arbitrary keyword arguments to it.

If you want to add the values of the variables to the template you defined, you must format the PromptTemplate inside the CustomComponent class.
</Admonition>


<Admonition type="info">
Unlike Langchain types, base Python types do not add a
[handle](../guidelines/components) to the field by default. To add handles,
use the _`input_types`_ key in the _`build_config`_ method.
</Admonition>
</Admonition>

- **build_config**: Used to define the configuration fields of the component (if applicable). It should always return a dictionary with specific keys representing the field names and corresponding configurations. This method is called when the code is processed (i.e., when you click _Check and Save_ in the code editor). It must follow the format described below:

Expand Down
Loading
Loading