Comments (3)
What do you expect the agent to do? Without tool the agent is equivalent to just a chat bot?
from langchain.
I want the agent to do a complex task. I read in some papers that agents are better at "thinking" and reasoning their answers than chatbots, even if you don't provide a tool for an agent.
from langchain.
Just do the following, since you just want to use the ChatBot functionality. Agent is desgined to be use with tools.
from langchain_community.chat_models.openai import ChatOpenAI
from langchain.prompts import PromptTemplate,ChatPromptTemplate,SystemMessagePromptTemplate,MessagesPlaceholder,HumanMessagePromptTemplate
llm = ChatOpenAI()
prompt_question = ChatPromptTemplate.from_messages([
SystemMessagePromptTemplate(prompt=PromptTemplate(input_variables=[], template="Question: {question}")),
MessagesPlaceholder(variable_name='chat_history', optional=True)
])
chain = prompt_question | llm
print(chain.invoke({'question':'how are you doing?','chat_history':[]}))
from langchain.
Related Issues (20)
- E2B DataAnalysisTool() function not working correctly
- RecursiveCharacterTextSplitter uses regex value instead of original separator when merging and keep_separator is false HOT 2
- DOC: <Issue related to /v0.2/docs/how_to/extraction_examples/> HOT 2
- openai.APIError: The model produced invalid content. HOT 3
- Issue with RunnableAssign<answer>: TypeError('can only concatenate str (not "ChatPromptValue") to str')Traceback (most recent call last): HOT 1
- DOC: Right way to initialize with past history of conversation
- DOC: <Issue related to /v0.2/docs/integrations/document_loaders/rst/>
- ImportError: cannot import name '_set_config_context' from 'langchain_core.runnables.config' HOT 2
- DOC: Add second exaple in Build a Simple LLM Application with LCEL docs page for better understanding
- import xml.etree.ElementTree as ET ModuleNotFoundError: No module named 'xml.etree'
- Langchain Tools: TypeError: BaseTool.invoke() takes from 2 to 3 positional arguments but 4 were given HOT 2
- Routing Example Does Not Work with langchain-openai > 0.1.8 HOT 4
- DOC: Lack of description of options (and thereby timeout) parameter in RemoteRunnable constructor.
- agent的memory如何添加?我尝试了许多方法,始终报错variable chat_history should be a list of base messages HOT 1
- DOC: how can i find a new chatmodel to substitute metioned in the docs HOT 2
- langchain_experimental openclip no gpu
- SQL Agent extracts the table name with \n linebreaker and next line word 'Observation' HOT 1
- ChatHuggingFace + HuggingFaceEndpoint does not properly implement `max_new_tokens` HOT 2
- rephrasing follow up question incorrectly
- openai: add "name" to supported properties for tool messages?
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.