updates instructor to the latest version. (#760)

* updates instructor to the latest version. adds jsonref, which instructor seems to depend on.

* updates embedchain reference, necessary for python 3.12
This commit is contained in:
Dan McKinley
2024-06-13 21:57:40 -07:00
committed by GitHub
parent d3b6640b4a
commit 0bc92a284d
3 changed files with 1112 additions and 658 deletions

1757
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -19,13 +19,14 @@ openai = "^1.13.3"
opentelemetry-api = "^1.22.0"
opentelemetry-sdk = "^1.22.0"
opentelemetry-exporter-otlp-proto-http = "^1.22.0"
instructor = "^0.5.2"
instructor = "1.3.3"
regex = "^2023.12.25"
crewai-tools = { version = "^0.2.6", optional = true }
click = "^8.1.7"
python-dotenv = "^1.0.0"
embedchain = "^0.1.98"
embedchain = "0.1.109"
appdirs = "^1.4.4"
jsonref = "^1.1.0"
[tool.poetry.extras]
tools = ["crewai-tools"]

View File

@@ -659,9 +659,9 @@ def test_agent_usage_metrics_are_captured_for_sequential_process():
assert result == "Howdy!"
assert crew.usage_metrics == {
"completion_tokens": 17,
"prompt_tokens": 160,
"prompt_tokens": 158,
"successful_requests": 1,
"total_tokens": 177,
"total_tokens": 175,
}
@@ -689,8 +689,8 @@ def test_agent_usage_metrics_are_captured_for_hierarchical_process():
assert result == '"Howdy!"'
print(crew.usage_metrics)
assert crew.usage_metrics == {
"total_tokens": 1664,
"prompt_tokens": 1381,
"total_tokens": 1659,
"prompt_tokens": 1376,
"completion_tokens": 283,
"successful_requests": 3,
}