Integration of Langchain create_pandas_dataframe_agent and Prompt Flow #2071
-
I have a Python file that utilizes AzureChatOpenAI, langchain agents (specifically the create_pandas_dataframe_agent) and Pandas to create an application that allows the user to ask questions based on different SQL tables (loaded as dataframes). My company is preparing to integrate this file into a live web application. Would Prompt Flow be useful for deployment and if so, any tips on how I can use prompt flow to create all the right aspects needed to get it functioning? I have reviewed this page: https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/how-to-integrate-with-langchain?view=azureml-api-2#Overview and was struggling to create the agent and set up the right dependencies, etc |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
@jiaochenlu Could you please help on this langchain integration question? Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi @ahadanjum, if you have existing Python code for implementing your Langchain agent, you can easily integrate it into a prompt flow by
Then to run such a flow in prompt flow, you have to set up the dependencies as mentioning in the documentation:
|
Beta Was this translation helpful? Give feedback.
And for the deploy option, currently we support deploy flow as an image, or deploy to managed online endpoint from azure machine learning workspace, which kind of deploy option would you prefer to?
Here is the doc of image related deployment guide: https://microsoft.github.io/promptflow/how-to-guides/deploy-a-flow/index.html
And we encourage user deploy from workspace portal if they would like to deploy flow as a managed online endpoint.