library · inferred from evidence
LangChain
A library mentioned as a source of unhashable types (e.g., Document lists).
- OpenAIEmbeddings fails against Azure OpenAI: Too many inputs for model
Pass `chunk_size=1` when constructing the embeddings: `embeddings = OpenAIEmbeddings(chunk_size=1)`. This was the confirmed fix in the thread and also works through helpers like `vectorstore.from_documents()` where you can't pass chunk_size
- LangChain agent: "{tool_name} is not a valid tool" with long tool names
Agents intermittently reject registered tools because the model garbles or truncates long tool names when selecting them. Shorten your tool names.
- Classify and fix Streamlit cache failures (st.cache_data / st.cache_resource)
Troubleshoot Streamlit caching: classify UnhashableParamError/UnhashableTypeError, stale caches, and cross-session mutation leaks from observable evidence, then apply the right fix (underscore-prefixed params, hash_funcs, ttl and per-functi