-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added yaml validator based on reference yaml. Simple but elegant apro…
…ach.
- Loading branch information
1 parent
867590f
commit 360bed4
Showing
5 changed files
with
56 additions
and
27 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from just_agents.interfaces.IAgent import build_agent | ||
from just_agents.utils import SchemaValidationError | ||
|
||
def test_yaml_validator(): | ||
try: | ||
agent = build_agent("wrong_yaml.yaml") | ||
except SchemaValidationError as e: | ||
assert "jus_streming_method" in str(e) | ||
assert "backup_optionss" in str(e) |
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,10 @@ | ||
class: "LLMSession" # class name to create could be LLMSession, ChainOfThoughtAgent. Default is LLMSession | ||
jus_streming_method: "openai" # protocol to handle llm format for function calling | ||
system_prompt: # system prompt exclude use of system_prompt_path | ||
completion_max_tries: 2 # maximum number of completion retries before giving up | ||
backup_optionss: # options that will be used after we give up with main options, one more completion call will be done with backup options | ||
key_list_path: # path to text file with list of api keys, one key per line | ||
tools: # list of functions that will be used as tools, each record should contain package and function name | ||
drop_params: True # drop params from the request, useful for some models that do not support them | ||
# - package: | ||
# function: |