ref: refactor csv output parser to dynamic single component (#3963)

* refactor csv output parser to dynamic single component

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Jordan Frazier 2024-10-01 10:05:35 -07:00 • committed by GitHub
commit a5bd766626
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 49 additions and 36 deletions

View file

@ -2,7 +2,7 @@ import os
import pytest
from langflow.components.models.OpenAIModel import OpenAIModelComponent
from langflow.components.output_parsers.CSVOutputParser import CSVOutputParserComponent
from langflow.components.output_parsers.OutputParser import OutputParserComponent
from langflow.components.prompts.Prompt import PromptComponent
from tests.integration.utils import ComponentInputHandle, run_single_component
@ -11,12 +11,12 @@ from tests.integration.utils import ComponentInputHandle, run_single_component
@pytest.mark.api_key_required
async def test_csv_output_parser_openai():
format_instructions = ComponentInputHandle(
clazz=CSVOutputParserComponent,
clazz=OutputParserComponent,
inputs={},
output_name="format_instructions",
)
output_parser_handle = ComponentInputHandle(
clazz=CSVOutputParserComponent,
clazz=OutputParserComponent,
inputs={},
output_name="output_parser",
)