Comments (5)
The function tool code :
def get_current_time():
weekdays = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
time_zone = pytz.timezone('Asia/Shanghai')
date_time = datetime.now(time_zone)
time_format = date_time.strftime("%Y-%m-%d %H:%M:%S")
week_day = date_time.weekday()
return f"CurrentTime: {time_format} {weekdays[week_day]}"
from langchain.
I also encountered this issue while using ChatTongyi, and after breakpoint source code feedback, Multiple tool_calls are not supported in message This feature will be supported in the future, Perhaps Tongyi does not currently support multi model scheduling?
from langchain.
I also encountered this issue while using ChatTongyi, and after breakpoint source code feedback, Multiple tool_calls are not supported in message This feature will be supported in the future, Perhaps Tongyi does not currently support multi model scheduling?
Maybe you're right. I tried to use create_react_agent.invoke() , like AgentExecutor on_llm_new_token callback , but it doesn't work.
from langchain.
This issue may occur when using create_tool_calling-agent. According to the error code displayed on the dashscope official website, it is due to passing incorrect parameters that this issue occurs. If you switch to create_json_chat_agent, this issue will not occur
prompt = hub.pull("hwchase17/react-chat-json")
agent = create_json_chat_agent(chat, tools, prompt)
# agent = create_tool_calling_agent(chat,tools,prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True, handle_parsing_errors=True)
resp =agent_executor.invoke({"input": "what is LangChain latest version?"})
print(resp)
from langchain.
This issue may occur when using create_tool_calling-agent. According to the error code displayed on the dashscope official website, it is due to passing incorrect parameters that this issue occurs. If you switch to create_json_chat_agent, this issue will not occur
prompt = hub.pull("hwchase17/react-chat-json") agent = create_json_chat_agent(chat, tools, prompt) # agent = create_tool_calling_agent(chat,tools,prompt) agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True, handle_parsing_errors=True) resp =agent_executor.invoke({"input": "what is LangChain latest version?"}) print(resp)
With langgraph.prebuilt.create_react_agent() is return CompiledGraph object.
Currently ChatTongyi() calling stream directly and carrying the tool still reports errors("Multiple tool_calls are not supported in message").
So I want to pass config={“callbacks”: “Streamingxxxxxx”} via invoke to get the chunk generated by on_llm_new_token , but it doesn't work.
from langchain.
Related Issues (20)
- Error in LangChainTracer.on_tool_end callback HOT 4
- Partners: Issues with `Streaming` and MistralAI `ainvoke` and `Callbacks` Not Working
- Bug: `AgentExecutor` doesn't use its local callbacks during planning HOT 1
- Rohit HOT 14
- Scheduled GitHub Actions Running on Forked Repositories HOT 1
- Initializing a LLM using HuggingFacePipeline.from_model_id crashes Google Colab HOT 5
- Error while running graph.query(movies_query) with Python v3.12.4 HOT 4
- Fix stop list of string in VLLM generate HOT 6
- File Not Closed in OutlookMessageLoader of langchain_community Library HOT 1
- DOC: inconsistency with similarity_search_with_score() HOT 2
- "Elevenlabs has no attribute "generate (only older versions of elevenlabs work with this wrapper) HOT 1
- MarkdownHeaderTextSplitter for header such like "**New Header 5**" HOT 2
- PydanticOutputParser Doesn't Parse Dates in Unions HOT 4
- When using GraphCypherQAChain to fetch documents from Neo4j, the embeddings field is also returned, which consumes all context window tokens HOT 2
- _InactiveRpcError of RPC HOT 1
- No module named 'langchain_community.document_loaders'; 'langchain_community' is not a package HOT 2
- DocumentDBVectorSearch and metadata filtering HOT 7
- create_react_agent validation error when using PipelinePromptTemplate
- AzureAIDocumentIntelligenceLoader does not load all PDF pages
- Passing transformer's pipeline to HuggingFacePipeline does not initialize the HuggingFacePipeline correctly.
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.