mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-29 11:09:07 +00:00
Noticing errors logged in some situations when tracing with Langsmith: ```python from langchain_core.pydantic_v1 import BaseModel from langchain_anthropic import ChatAnthropic class AnswerWithJustification(BaseModel): """An answer to the user question along with justification for the answer.""" answer: str justification: str llm = ChatAnthropic(model="claude-3-haiku-20240307") structured_llm = llm.with_structured_output(AnswerWithJustification) list(structured_llm.stream("What weighs more a pound of bricks or a pound of feathers")) ``` ``` Error in LangChainTracer.on_chain_end callback: AttributeError("'NoneType' object has no attribute 'append'") [AnswerWithJustification(answer='A pound of bricks and a pound of feathers weigh the same amount.', justification='This is because a pound is a unit of mass, not volume. By definition, a pound of any material, whether bricks or feathers, will weigh the same - one pound. The physical size or volume of the materials does not matter when measuring by mass. So a pound of bricks and a pound of feathers both weigh exactly one pound.')] ``` |
||
---|---|---|
.. | ||
cli | ||
community | ||
core | ||
experimental | ||
langchain | ||
partners | ||
standard-tests | ||
text-splitters |