-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does anyone created agent with tool which takes "dataframe" and "user_input" as input variables in langchain? #10028
Comments
🤖 Hello, Yes, it is indeed possible to create an agent in LangChain that accepts both a "dataframe" and "user_input" as input variables. You can achieve this by modifying the @classmethod
def create_prompt(
cls,
tools: Sequence[BaseTool],
prefix: str = PREFIX,
suffix: str = SUFFIX,
human_message_template: str = HUMAN_MESSAGE_TEMPLATE,
format_instructions: str = FORMAT_INSTRUCTIONS,
input_variables: Optional[List[str]] = None,
memory_prompts: Optional[List[BasePromptTemplate]] = None,
) -> BasePromptTemplate:
# ... existing code ...
if input_variables is None:
input_variables = ["dataframe", "user_input", "agent_scratchpad"]
# ... existing code ... In the above code, we have modified the You can find the Please note that this modification will affect all instances of I hope this helps! If you have any further questions, feel free to ask. Best regards, SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
I have requirement like this I need generate insights from the data frame table where i create two tools |
Hi, @bmshambu! I'm Dosu, and I'm here to help the LangChain team manage our backlog. I wanted to let you know that we are marking this issue as stale. From what I understand, you were asking if anyone has created an agent in LangChain that takes a dataframe and user input as input variables. There hasn't been any response or suggestion provided yet, but I have given a helpful response. I explained how to modify the If this issue is still relevant to the latest version of the LangChain repository, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you for your understanding and contribution to the LangChain project! If you have any further questions or need assistance, feel free to reach out. |
Issue you'd like to raise.
Does anyone created agent with tool which takes "dataframe" and "user_input" as input variables in langchain?
I do not want use dataframe agent which is there already in langchain. As I need pass further instruction in the prompt template.
Suggestion:
No response
The text was updated successfully, but these errors were encountered: