mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-27 09:08:14 +00:00
Refactor token tracking: Remove token_cost_process parameter for cleaner code
This commit is contained in:
@@ -133,8 +133,14 @@ class TestTokenTracking:
|
||||
Integration test for token tracking with LangChainAgentAdapter.
|
||||
This test requires an OpenAI API key.
|
||||
"""
|
||||
# Skip if LangGraph is not installed
|
||||
try:
|
||||
from langgraph.prebuilt import ToolNode
|
||||
except ImportError:
|
||||
pytest.skip("LangGraph is not installed. Install it with: uv add langgraph")
|
||||
|
||||
# Initialize a ChatOpenAI model
|
||||
llm = ChatOpenAI(model="gpt-3.5-turbo")
|
||||
llm = ChatOpenAI(model="gpt-4o")
|
||||
|
||||
# Create a LangChainAgentAdapter with the direct LLM
|
||||
agent = LangChainAgentAdapter(
|
||||
|
||||
Reference in New Issue
Block a user