Merge branch 'zustand/io/migration' of personal:logspace-ai/langflow into zustand/io/migration
This commit is contained in:
commit
9c125d1c22
4 changed files with 13 additions and 3 deletions
|
|
@ -13,6 +13,7 @@ from .constants import (
|
|||
Callable,
|
||||
Chain,
|
||||
ChatPromptTemplate,
|
||||
Code,
|
||||
Data,
|
||||
Document,
|
||||
Embeddings,
|
||||
|
|
@ -73,4 +74,5 @@ __all__ = [
|
|||
"Prompt",
|
||||
"RangeSpec",
|
||||
"TemplateField",
|
||||
"Code",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -34,6 +34,10 @@ class Prompt:
|
|||
pass
|
||||
|
||||
|
||||
class Code:
|
||||
pass
|
||||
|
||||
|
||||
LANGCHAIN_BASE_TYPES = {
|
||||
"Chain": Chain,
|
||||
"AgentExecutor": AgentExecutor,
|
||||
|
|
|
|||
|
|
@ -121,7 +121,13 @@ def get_field_properties(extra_field):
|
|||
def process_type(field_type: str):
|
||||
if field_type.startswith("list") or field_type.startswith("List"):
|
||||
return extract_inner_type(field_type)
|
||||
return "prompt" if field_type == "Prompt" else field_type
|
||||
|
||||
# field_type is a string can be Prompt or Code too
|
||||
# so we just need to lower if it is the case
|
||||
lowercase_type = field_type.lower()
|
||||
if lowercase_type in ["prompt", "code"]:
|
||||
return lowercase_type
|
||||
return field_type
|
||||
|
||||
|
||||
def add_new_custom_field(
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
class Prompt:
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue