pull/392/head
Kye 11 months ago
parent c82f4f9b5a
commit d23884d5d3

@ -11,7 +11,4 @@ agent = Agent(
) )
# Run the workflow on a task # Run the workflow on a task
agent( agent("Find a chick fil a equivalent in hayes valley")
"Find a chick fil a equivalent in hayes valley"
)

@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry] [tool.poetry]
name = "swarms" name = "swarms"
version = "4.1.7" version = "4.1.8"
description = "Swarms - Pytorch" description = "Swarms - Pytorch"
license = "MIT" license = "MIT"
authors = ["Kye Gomez <kye@apac.ai>"] authors = ["Kye Gomez <kye@apac.ai>"]

@ -1,13 +1,13 @@
import pytest
from unittest.mock import MagicMock from unittest.mock import MagicMock
from swarms.models.fire_function import FireFunctionCaller from swarms.models.fire_function import FireFunctionCaller
def test_fire_function_caller_run(mocker): def test_fire_function_caller_run(mocker):
# Create mock model and tokenizer # Create mock model and tokenizer
model = MagicMock() model = MagicMock()
tokenizer = MagicMock() tokenizer = MagicMock()
mocker.patch.object(FireFunctionCaller, 'model', model) mocker.patch.object(FireFunctionCaller, "model", model)
mocker.patch.object(FireFunctionCaller, 'tokenizer', tokenizer) mocker.patch.object(FireFunctionCaller, "tokenizer", tokenizer)
# Create mock task and arguments # Create mock task and arguments
task = "Add 2 and 3" task = "Add 2 and 3"
@ -38,4 +38,6 @@ def test_fire_function_caller_run(mocker):
tokenizer.batch_decode.assert_called_once_with(generated_ids) tokenizer.batch_decode.assert_called_once_with(generated_ids)
# Assert the decoded output is printed # Assert the decoded output is printed
assert decoded_output in mocker.patch.object(print, 'call_args_list') assert decoded_output in mocker.patch.object(
print, "call_args_list"
)

Loading…
Cancel
Save