mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-15 19:18:30 +00:00
Fix CI issues: lint, type checker, and test failures
- Remove unused imports from test and example files - Fix f-string formatting in examples - Add proper type handling for Union[str, Dict] in agent_utils.py - Fix XML parser test assertion to match expected output - Use isinstance() for proper type narrowing in LLM calls Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
Example demonstrating the new LLM generations and logprobs functionality.
|
||||
"""
|
||||
|
||||
from crewai import Agent, Task, Crew, LLM
|
||||
from crewai.utilities.xml_parser import extract_xml_content, extract_multiple_xml_tags
|
||||
from crewai import Agent, Task, LLM
|
||||
from crewai.utilities.xml_parser import extract_xml_content
|
||||
|
||||
|
||||
def example_multiple_generations():
|
||||
@@ -133,7 +133,7 @@ def example_logprobs_analysis():
|
||||
print(f"Available logprobs data: {len(logprobs)} choices")
|
||||
|
||||
if usage:
|
||||
print(f"\nToken usage:")
|
||||
print("\nToken usage:")
|
||||
print(f"Prompt tokens: {usage.get('prompt_tokens', 'N/A')}")
|
||||
print(f"Completion tokens: {usage.get('completion_tokens', 'N/A')}")
|
||||
print(f"Total tokens: {usage.get('total_tokens', 'N/A')}")
|
||||
|
||||
Reference in New Issue
Block a user