- 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>
- Add support for n generations and logprobs parameters in LLM class
- Extend Agent class to accept LLM generation parameters (llm_n, llm_logprobs, llm_top_logprobs)
- Add return_full_completion parameter to access complete LLM response metadata
- Implement XML parser utility for extracting content from tags like <thinking>
- Add completion metadata support to TaskOutput and LiteAgentOutput classes
- Add comprehensive tests and examples demonstrating new functionality
- Maintain full backward compatibility with existing code
Addresses issue #3052: How to obtain n generations or generations in different tags
Co-Authored-By: João <joao@crewai.com>