Skip to content

Commit d63b8d7

Browse files
committed
update code
1 parent 022b505 commit d63b8d7

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.devcontainer/default_requirements.txt

+3
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ pydash
1515
wheel
1616
azure-mgmt-storage==21.0.0
1717
google-search-results==2.4.1
18+
opencensus-ext-azure
19+
promptflow[azure]
20+
promptflow-tools

.devcontainer/devcontainer.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
"prompt-flow.prompt-flow"
1919
],
2020

21+
// Use 'postCreateCommand' to run commands after the container is created.
22+
"postCreateCommand": "pip install -r ${containerWorkspaceFolder}/src/promptflow/dev_requirements.txt --force-reinstall;pip install -r ${containerWorkspaceFolder}/src/promptflow-tools/requirements.txt --force-reinstall;pip install -e ${containerWorkspaceFolder}/src/promptflow;pip install -e ${containerWorkspaceFolder}/src/promptflow-tools",
23+
2124
"runArgs": ["-v", "/var/run/docker.sock:/var/run/docker.sock"]
22-
// "mounts": ["source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"],
2325
}

examples/flows/standard/gen-docstring/main.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
from diff import show_diff
44
from load_code_tool import load_code
55
from promptflow import PFClient
6+
from pathlib import Path
67

78

89
if __name__ == "__main__":
10+
current_folder = Path(__file__).absolute().parent
911
parser = argparse.ArgumentParser(description="The code path of code that need to generate docstring.")
10-
parser.add_argument("--source", help="Path for the code file", default='./azure_open_ai.py')
12+
parser.add_argument("--source", help="Path for the code file", default=current_folder / 'azure_open_ai.py')
1113
args = parser.parse_args()
1214

1315
pf = PFClient()
1416
source = args.source
15-
flow_result = pf.test(flow="./", inputs={"source": source})
17+
flow_result = pf.test(flow=current_folder, inputs={"source": source})
1618
show_diff(load_code(source), flow_result['code'], File(source).filename)

0 commit comments

Comments
 (0)