An intelligent copilot designed for promptflow
The Promptflow Copilot is an intelligent assistant built on the ChatGPT platform, designed to interactively assist Promptflow users with:
From root folder, install the requirements using
pip install -r requirements.txt
Create a pfcopilot.env file in root folder, reference pfcopilot.env.example to set the corresponding environment variables in your own pfcopilot.env file.
Promptflow Copilot relys on the function calling features of OpenAI API. You must use models or deployments that support function calling. learn more about function calling
Currently, we provide two ways to chat with promptflow copilot
python main.py
Then you can chat with it like that:
You can start a new chat by click the New chat
button.
python copilot_cli.py
Then you can chat with it like that:
You can end the chat by type exit
in the command line, or start a new chat by type new chat
in the command line.
chat with promptflow copilot
for example:
Ask copilot to create a promptflow to achieve your goal:
my goal: check if there are gramma mistakes in a github repo's files, the file may be written with python, c, go or any programming language; if found gramma mistakes, create a pull request to fix the gramma mistakes
Ask copilot to create promptflow based on your own python application
I have a python program in my_app.py, please convert it into a flow
Your app.py can be like this:
search_query = ''
bing_engine = BingEngine()
google_engine = GoogleEngine()
bing_results = bing_engine.search(search_query)
google_results = google_engine.search(search_query)
men_charactor = "You are a man. compare the search results from bing and google, and choose the one you like."
women_charactor = "You are a woman. compare the search results from bing and google, and choose the one you like."
men_choice = choose(men_charactor, bing_results, google_results)
women_choice = choose(men_charactor, bing_results, google_results)
return {'men': men_choice, 'women': women_choice}
or
I have a python program in the folder C:\LangchainTests\chat_with_pdf, can you understand it and help to convert it into a flow
Ask copilot to generate bulktest input data
geneate bulktest inputs data for the flow
Ask copilot to generate evaluation flow
generate evaluation flow for the flow
Ask copilot to understand an existing promptflow
I have a promptflow in the folder C:\Tests\myflow, can you understand it
Ask copilot to add variant for llm node
Please add variant for my_llm node in my flow