-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be8de5e
commit 4fa8bde
Showing
6 changed files
with
70 additions
and
11 deletions.
There are no files selected for viewing
6 changes: 4 additions & 2 deletions
6
backend/chatsky_ui/schemas/front_graph_components/pipeline.py
This file contains 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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
from typing import List | ||
from typing import List, Optional | ||
|
||
from pydantic import Field | ||
|
||
from .base_component import BaseComponent | ||
|
||
|
||
class Pipeline(BaseComponent): | ||
flows: List[dict] | ||
interface: dict | ||
llmConfigurations: List[dict] | ||
llmConfigurations: Optional[List[dict]] = Field(default=None) |
This file contains 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 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 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 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
11 changes: 11 additions & 0 deletions
11
backend/chatsky_ui/tests/services/test_json_converter/test_llm_converter.py
This file contains 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,11 @@ | ||
import os | ||
|
||
from chatsky_ui.services.json_converter.llm_converter import LLMModelsConverter | ||
|
||
|
||
class TestLLMModelsConverter: | ||
def test_llm_models_converter(self, llm_models_config, chatsky_llm_models): | ||
os.environ["OPENAI_API_KEY"] = "some_token" | ||
converted_models = LLMModelsConverter(llm_models_config)() | ||
|
||
assert converted_models == chatsky_llm_models |