Comments (2)
Hi @Alexjes98 ,
You're not passing the chat_history
variable to the agent. You need to do :
agent = (
{
"input": lambda x: x["input"],
"chat_history": lambda x: x["chat_history"],
"agent_scratchpad": lambda x: format_to_openai_tool_messages(
x["intermediate_steps"]
),
}
| prompt
| llm_with_tools
| OpenAIToolsAgentOutputParser()
)
from langchain.
Thank you @maximeperrindev It worked for me
from langchain.
Related Issues (20)
- model_name in ChatResult from BaseChatOpenAI is not sourced from API response HOT 2
- `load_chain` uses incorrect class when loading `LLMChain` with `HuggingFacePipeline` HOT 7
- Bot3 HOT 4
- HuggingFacePipeline can‘t load model from local repository HOT 1
- LlamaCppEmbeddings gives a TypeError on line 114 saying TypeError: float() argument must be a string or a real number, not 'list' HOT 4
- With langchain v0.2.2 use ChatTongyi(streaming=True) occurred error ' KeyError: 'request' ' HOT 5
- 使用ChatSparkLLM构造的llm,在模型返回ConnectionError后,无法再次invoke
- DOC: <Issue related to /v0.2/docs/integrations/tools/wolfram_alpha/> returned answers are incomplete.
- DOC: ConfluenceLoader docstring refer to wrong class name
- api_controller fails to specify tool in Action, entering infinite loop HOT 3
- openai model always includes the input prompt in its output
- LLMGraphTransformer giveback empty nodes and relationships ( with gpt-4o ) HOT 1
- Incorrect passing of scores for sorting in CrossEncoderReranker HOT 3
- DOC: <Please write a comprehensive title after the 'DOC: ' prefix> HOT 3
- 91 Club Hack Mod APK 6886 | Download latest version for Android 2024
- langchain agents executor throws: assert generation is not None HOT 4
- 'error': {'message': "Missing parameter 'tool_call_id': messages with role 'tool' must have a 'tool_call_id'
- The FAISS.from_documents function called many times, It'll cause memory leak. How to destroy the object? HOT 1
- DOCS: Split integrations/llm_cache page into separate pages
- [BUG] langchain-openai - max_tokens - 2 confirmed bugs HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langchain.