From 8e8affe24ded5fa88e5dd3f80730b1f58198b405 Mon Sep 17 00:00:00 2001 From: ks6088ts Date: Fri, 30 Aug 2024 12:21:15 +0900 Subject: [PATCH 1/7] get started with Prompt flow --- README.md | 1 + apps/11_promptflow/.gitignore | 1 + apps/11_promptflow/README.md | 72 ++ apps/11_promptflow/chat_minimal/chat.prompty | 22 + apps/11_promptflow/chat_minimal/data.jsonl | 2 + apps/11_promptflow/chat_minimal/main.py | 21 + poetry.lock | 895 ++++++++++++++++++- pyproject.toml | 1 + requirements.txt | 1 + 9 files changed, 997 insertions(+), 19 deletions(-) create mode 100644 apps/11_promptflow/.gitignore create mode 100644 apps/11_promptflow/README.md create mode 100644 apps/11_promptflow/chat_minimal/chat.prompty create mode 100644 apps/11_promptflow/chat_minimal/data.jsonl create mode 100644 apps/11_promptflow/chat_minimal/main.py diff --git a/README.md b/README.md index 1edc755..79299ac 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ Here are the preferred tools for development. | [8_streamlit_azure_openai_batch](./apps/8_streamlit_azure_openai_batch/README.md) | Call Azure OpenAI Batch API with Streamlit | ![8_streamlit_azure_openai_batch](./docs/images/8_streamlit_azure_openai_batch.main.png) | | [9_streamlit_azure_document_intelligence](./apps/9_streamlit_azure_document_intelligence/README.md) | Call Azure AI Document Intelligence API with Streamlit | ![9_streamlit_azure_document_intelligence](./docs/images/9_streamlit_azure_document_intelligence.main.png) | | [10_streamlit_batch_transcription](./apps/10_streamlit_batch_transcription/README.md) | Call Batch Transcription API with Streamlit | ![10_streamlit_batch_transcription](./docs/images/10_streamlit_batch_transcription.main.png) | +| [11_promptflow](./apps/11_promptflow/README.md) | Get started with Prompt flow | No Image | | [99_streamlit_examples](./apps/99_streamlit_examples/README.md) | Code samples for Streamlit | ![99_streamlit_examples](./docs/images/99_streamlit_examples.explaindata.png) | ## How to run diff --git a/apps/11_promptflow/.gitignore b/apps/11_promptflow/.gitignore new file mode 100644 index 0000000..8b64b37 --- /dev/null +++ b/apps/11_promptflow/.gitignore @@ -0,0 +1 @@ +**/.promptflow/* diff --git a/apps/11_promptflow/README.md b/apps/11_promptflow/README.md new file mode 100644 index 0000000..dfb0331 --- /dev/null +++ b/apps/11_promptflow/README.md @@ -0,0 +1,72 @@ +# Getting Started with Prompt flow + +This application explains how to get started with [Prompt flow](https://github.com/microsoft/promptflow), a Python library that provides a simple and easy way to build conversational AI applications. + +## Prerequisites + +- Python 3.10 or later +- Azure OpenAI Service + +## Overview + +Prompt flow is a suite of development tools designed to streamline the end-to-end development cycle of LLM-based AI applications, from ideation, prototyping, testing, evaluation to production deployment and monitoring. It makes prompt engineering much easier and enables you to build LLM apps with production quality. + +## Usage + +1. Get the API key for Azure OpenAI Service +1. Copy [.env.template](../../.env.template) to `.env` in the same directory +1. Set credentials in `.env` +1. Run scripts in the [apps/11_promptflow](./) directory + +Set up the environment and install dependencies: + +```shell +# Create a virtual environment +$ python -m venv .venv + +# Activate the virtual environment +$ source .venv/bin/activate + +# Install dependencies +$ pip install -r requirements.txt +``` + +## Examples + +[Prompt flow > Quick start](https://microsoft.github.io/promptflow/how-to-guides/quick-start.html) provides a quick start guide to Prompt flow. + +### [chat_minimal](https://github.com/microsoft/promptflow/tree/main/examples/flex-flows/chat-minimal) + +**Run as normal Python script** + +```shell +$ python apps/11_promptflow/chat_minimal/main.py +``` + +**Run from CLI** + +```shell +$ cd apps/11_promptflow/chat_minimal + +# Test flow +$ pf flow test \ + --flow main:chat \ + --inputs question="What's the capital of France?" + +# Test flow: multi turn, access to http://localhost:{EPHEMERAL_PORT} +$ pf flow test \ + --flow main:chat \ + --ui + +# Create run with multiple lines data +$ pf run create \ + --flow main:chat \ + --data ./data.jsonl \ + --column-mapping question='${data.question}' \ + --stream +``` + +## References + +- [Prompt flow > repos](https://github.com/microsoft/promptflow) +- [Prompt flow > documents](https://microsoft.github.io/promptflow/) diff --git a/apps/11_promptflow/chat_minimal/chat.prompty b/apps/11_promptflow/chat_minimal/chat.prompty new file mode 100644 index 0000000..9a8a4ae --- /dev/null +++ b/apps/11_promptflow/chat_minimal/chat.prompty @@ -0,0 +1,22 @@ +--- +name: Minimal Chat +model: + api: chat + configuration: + type: azure_openai + azure_deployment: gpt-4o + parameters: + temperature: 0.2 + max_tokens: 1024 +inputs: + question: + type: string +sample: + question: "What is Prompt flow?" +--- + +system: +You are a helpful assistant. + +user: +{{question}} diff --git a/apps/11_promptflow/chat_minimal/data.jsonl b/apps/11_promptflow/chat_minimal/data.jsonl new file mode 100644 index 0000000..119dae4 --- /dev/null +++ b/apps/11_promptflow/chat_minimal/data.jsonl @@ -0,0 +1,2 @@ +{"question": "What is Prompt flow?"} +{"question": "What is ChatGPT? Please explain with consise statement"} \ No newline at end of file diff --git a/apps/11_promptflow/chat_minimal/main.py b/apps/11_promptflow/chat_minimal/main.py new file mode 100644 index 0000000..e7b15e1 --- /dev/null +++ b/apps/11_promptflow/chat_minimal/main.py @@ -0,0 +1,21 @@ +from pathlib import Path + +from dotenv import load_dotenv +from promptflow.core import Prompty +from promptflow.tracing import start_trace, trace + +BASE_DIR = Path(__file__).absolute().parent + + +@trace +def chat(question: str) -> str: + load_dotenv() + prompty = Prompty.load(source=f"{BASE_DIR}/chat.prompty") + return prompty(question=question) + + +if __name__ == "__main__": + start_trace() + + result = chat("What's the capital of France?") + print(result) diff --git a/poetry.lock b/poetry.lock index e41091d..73cc93a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "absl-py" @@ -158,6 +158,20 @@ all = ["altair-tiles (>=0.3.0)", "anywidget (>=0.9.0)", "pyarrow (>=11)", "vega- dev = ["geopandas", "hatch", "ipython", "m2r", "mypy", "pandas-stubs", "pytest", "pytest-cov", "ruff (>=0.3.0)", "types-jsonschema", "types-setuptools"] doc = ["docutils", "jinja2", "myst-parser", "numpydoc", "pillow (>=9,<10)", "pydata-sphinx-theme (>=0.14.1)", "scipy", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinxext-altair"] +[[package]] +name = "aniso8601" +version = "9.0.1" +description = "A library for parsing ISO 8601 strings." +optional = false +python-versions = "*" +files = [ + {file = "aniso8601-9.0.1-py2.py3-none-any.whl", hash = "sha256:1d2b7ef82963909e93c4f24ce48d4de9e66009a21bf1c1e1c85bdd0812fe412f"}, + {file = "aniso8601-9.0.1.tar.gz", hash = "sha256:72e3117667eedf66951bb2d93f4296a56b94b078a8a95905a052611fb3f1b973"}, +] + +[package.extras] +dev = ["black", "coverage", "isort", "pre-commit", "pyenchant", "pylint"] + [[package]] name = "annotated-types" version = "0.7.0" @@ -191,6 +205,20 @@ doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphin test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] trio = ["trio (>=0.23)"] +[[package]] +name = "argcomplete" +version = "3.5.0" +description = "Bash tab completion for argparse" +optional = false +python-versions = ">=3.8" +files = [ + {file = "argcomplete-3.5.0-py3-none-any.whl", hash = "sha256:d4bcf3ff544f51e16e54228a7ac7f486ed70ebf2ecfe49a63a91171c76bf029b"}, + {file = "argcomplete-3.5.0.tar.gz", hash = "sha256:4349400469dccfb7950bb60334a680c58d88699bff6159df61251878dc6bf74b"}, +] + +[package.extras] +test = ["coverage", "mypy", "pexpect", "ruff", "wheel"] + [[package]] name = "async-timeout" version = "4.0.3" @@ -300,6 +328,25 @@ msal = ">=1.24.0" msal-extensions = ">=0.3.0" typing-extensions = ">=4.0.0" +[[package]] +name = "azure-monitor-opentelemetry-exporter" +version = "1.0.0b25" +description = "Microsoft Azure Monitor Opentelemetry Exporter Client Library for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "azure-monitor-opentelemetry-exporter-1.0.0b25.tar.gz", hash = "sha256:a38167ce43c40747f6863047a37e6748726b058b4cef6a27c4029d1c19e2f8fe"}, + {file = "azure_monitor_opentelemetry_exporter-1.0.0b25-py2.py3-none-any.whl", hash = "sha256:7a78f2553fda28ac7649d7a06651a4af91d1493bd3c51c8071c86a6e464671b1"}, +] + +[package.dependencies] +azure-core = ">=1.28.0,<2.0.0" +fixedint = "0.1.6" +msrest = ">=0.6.10" +opentelemetry-api = ">=1.21,<2.0" +opentelemetry-sdk = ">=1.21,<2.0" +psutil = ">=5.9.8" + [[package]] name = "azure-search-documents" version = "11.5.1" @@ -844,6 +891,23 @@ files = [ marshmallow = ">=3.18.0,<4.0.0" typing-inspect = ">=0.4.0,<1" +[[package]] +name = "deprecated" +version = "1.2.14" +description = "Python @deprecated decorator to deprecate old python classes, functions or methods." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "Deprecated-1.2.14-py2.py3-none-any.whl", hash = "sha256:6fac8b097794a90302bdbb17b9b815e732d3c4720583ff1b198499d78470466c"}, + {file = "Deprecated-1.2.14.tar.gz", hash = "sha256:e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3"}, +] + +[package.dependencies] +wrapt = ">=1.10,<2" + +[package.extras] +dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "sphinx (<2)", "tox"] + [[package]] name = "distlib" version = "0.3.8" @@ -866,6 +930,17 @@ files = [ {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, ] +[[package]] +name = "docstring-parser" +version = "0.16" +description = "Parse Python docstrings in reST, Google and Numpydoc format" +optional = false +python-versions = ">=3.6,<4.0" +files = [ + {file = "docstring_parser-0.16-py3-none-any.whl", hash = "sha256:bf0a1387354d3691d102edef7ec124f219ef639982d096e26e3b60aeffa90637"}, + {file = "docstring_parser-0.16.tar.gz", hash = "sha256:538beabd0af1e2db0146b6bd3caa526c35a34d61af9fd2887f3a8a27a739aa6e"}, +] + [[package]] name = "exceptiongroup" version = "1.2.0" @@ -880,6 +955,26 @@ files = [ [package.extras] test = ["pytest (>=6)"] +[[package]] +name = "fastapi" +version = "0.112.2" +description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" +optional = false +python-versions = ">=3.8" +files = [ + {file = "fastapi-0.112.2-py3-none-any.whl", hash = "sha256:db84b470bd0e2b1075942231e90e3577e12a903c4dc8696f0d206a7904a7af1c"}, + {file = "fastapi-0.112.2.tar.gz", hash = "sha256:3d4729c038414d5193840706907a41839d839523da6ed0c2811f1168cac1798c"}, +] + +[package.dependencies] +pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0" +starlette = ">=0.37.2,<0.39.0" +typing-extensions = ">=4.8.0" + +[package.extras] +all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.7)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] +standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "jinja2 (>=2.11.2)", "python-multipart (>=0.0.7)", "uvicorn[standard] (>=0.12.0)"] + [[package]] name = "filelock" version = "3.13.1" @@ -896,6 +991,89 @@ docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1 testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"] typing = ["typing-extensions (>=4.8)"] +[[package]] +name = "filetype" +version = "1.2.0" +description = "Infer file type and MIME type of any file/buffer. No external dependencies." +optional = false +python-versions = "*" +files = [ + {file = "filetype-1.2.0-py2.py3-none-any.whl", hash = "sha256:7ce71b6880181241cf7ac8697a2f1eb6a8bd9b429f7ad6d27b8db9ba5f1c2d25"}, + {file = "filetype-1.2.0.tar.gz", hash = "sha256:66b56cd6474bf41d8c54660347d37afcc3f7d1970648de365c102ef77548aadb"}, +] + +[[package]] +name = "fixedint" +version = "0.1.6" +description = "simple fixed-width integers" +optional = false +python-versions = "*" +files = [ + {file = "fixedint-0.1.6-py2-none-any.whl", hash = "sha256:41953193f08cbe984f584d8513c38fe5eea5fbd392257433b2210391c8a21ead"}, + {file = "fixedint-0.1.6-py3-none-any.whl", hash = "sha256:b8cf9f913735d2904deadda7a6daa9f57100599da1de57a7448ea1be75ae8c9c"}, + {file = "fixedint-0.1.6.tar.gz", hash = "sha256:703005d090499d41ce7ce2ee7eae8f7a5589a81acdc6b79f1728a56495f2c799"}, +] + +[[package]] +name = "flask" +version = "3.0.3" +description = "A simple framework for building complex web applications." +optional = false +python-versions = ">=3.8" +files = [ + {file = "flask-3.0.3-py3-none-any.whl", hash = "sha256:34e815dfaa43340d1d15a5c3a02b8476004037eb4840b34910c6e21679d288f3"}, + {file = "flask-3.0.3.tar.gz", hash = "sha256:ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842"}, +] + +[package.dependencies] +blinker = ">=1.6.2" +click = ">=8.1.3" +itsdangerous = ">=2.1.2" +Jinja2 = ">=3.1.2" +Werkzeug = ">=3.0.0" + +[package.extras] +async = ["asgiref (>=3.2)"] +dotenv = ["python-dotenv"] + +[[package]] +name = "flask-cors" +version = "4.0.1" +description = "A Flask extension adding a decorator for CORS support" +optional = false +python-versions = "*" +files = [ + {file = "Flask_Cors-4.0.1-py2.py3-none-any.whl", hash = "sha256:f2a704e4458665580c074b714c4627dd5a306b333deb9074d0b1794dfa2fb677"}, + {file = "flask_cors-4.0.1.tar.gz", hash = "sha256:eeb69b342142fdbf4766ad99357a7f3876a2ceb77689dc10ff912aac06c389e4"}, +] + +[package.dependencies] +Flask = ">=0.9" + +[[package]] +name = "flask-restx" +version = "1.3.0" +description = "Fully featured framework for fast, easy and documented API development with Flask" +optional = false +python-versions = "*" +files = [ + {file = "flask-restx-1.3.0.tar.gz", hash = "sha256:4f3d3fa7b6191fcc715b18c201a12cd875176f92ba4acc61626ccfd571ee1728"}, + {file = "flask_restx-1.3.0-py2.py3-none-any.whl", hash = "sha256:636c56c3fb3f2c1df979e748019f084a938c4da2035a3e535a4673e4fc177691"}, +] + +[package.dependencies] +aniso8601 = ">=0.82" +Flask = ">=0.8,<2.0.0 || >2.0.0" +importlib-resources = "*" +jsonschema = "*" +pytz = "*" +werkzeug = "!=2.0.0" + +[package.extras] +dev = ["Faker (==2.0.0)", "black", "blinker", "invoke (==2.2.0)", "mock (==3.0.5)", "pytest (==7.0.1)", "pytest-benchmark (==3.4.1)", "pytest-cov (==4.0.0)", "pytest-flask (==1.3.0)", "pytest-mock (==3.6.1)", "pytest-profiling (==1.7.0)", "setuptools", "tox", "twine (==3.8.0)", "tzlocal"] +doc = ["Sphinx (==5.3.0)", "alabaster (==0.7.12)", "sphinx-issues (==3.0.1)"] +test = ["Faker (==2.0.0)", "blinker", "invoke (==2.2.0)", "mock (==3.0.5)", "pytest (==7.0.1)", "pytest-benchmark (==3.4.1)", "pytest-cov (==4.0.0)", "pytest-flask (==1.3.0)", "pytest-mock (==3.6.1)", "pytest-profiling (==1.7.0)", "setuptools", "twine (==3.8.0)", "tzlocal"] + [[package]] name = "flatbuffers" version = "24.3.25" @@ -1129,6 +1307,23 @@ gitdb = ">=4.0.1,<5" doc = ["sphinx (==4.3.2)", "sphinx-autodoc-typehints", "sphinx-rtd-theme", "sphinxcontrib-applehelp (>=1.0.2,<=1.0.4)", "sphinxcontrib-devhelp (==1.0.2)", "sphinxcontrib-htmlhelp (>=2.0.0,<=2.0.1)", "sphinxcontrib-qthelp (==1.0.3)", "sphinxcontrib-serializinghtml (==1.1.5)"] test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "typing-extensions"] +[[package]] +name = "googleapis-common-protos" +version = "1.65.0" +description = "Common protobufs used in Google APIs" +optional = false +python-versions = ">=3.7" +files = [ + {file = "googleapis_common_protos-1.65.0-py2.py3-none-any.whl", hash = "sha256:2972e6c496f435b92590fd54045060867f3fe9be2c82ab148fc8885035479a63"}, + {file = "googleapis_common_protos-1.65.0.tar.gz", hash = "sha256:334a29d07cddc3aa01dee4988f9afd9b2916ee2ff49d6b757155dc0d197852c0"}, +] + +[package.dependencies] +protobuf = ">=3.20.2,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0.dev0" + +[package.extras] +grpc = ["grpcio (>=1.44.0,<2.0.0.dev0)"] + [[package]] name = "greenlet" version = "3.0.3" @@ -1281,6 +1476,44 @@ files = [ {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] +[[package]] +name = "importlib-metadata" +version = "8.4.0" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "importlib_metadata-8.4.0-py3-none-any.whl", hash = "sha256:66f342cc6ac9818fc6ff340576acd24d65ba0b3efabb2b4ac08b598965a4a2f1"}, + {file = "importlib_metadata-8.4.0.tar.gz", hash = "sha256:9a547d3bc3608b025f93d403fdd1aae741c24fbb8314df4b155675742ce303c5"}, +] + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] + +[[package]] +name = "importlib-resources" +version = "6.4.4" +description = "Read resources from Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "importlib_resources-6.4.4-py3-none-any.whl", hash = "sha256:dda242603d1c9cd836c3368b1174ed74cb4049ecd209e7a1a0104620c18c5c11"}, + {file = "importlib_resources-6.4.4.tar.gz", hash = "sha256:20600c8b7361938dc0bb2d5ec0297802e575df486f5a544fa414da65e13721f7"}, +] + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["jaraco.test (>=5.4)", "pytest (>=6,!=8.1.*)", "zipp (>=3.17)"] +type = ["pytest-mypy"] + [[package]] name = "iniconfig" version = "2.0.0" @@ -1306,6 +1539,35 @@ files = [ [package.dependencies] six = "*" +[[package]] +name = "itsdangerous" +version = "2.2.0" +description = "Safely pass data to untrusted environments and back." +optional = false +python-versions = ">=3.8" +files = [ + {file = "itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef"}, + {file = "itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173"}, +] + +[[package]] +name = "jaraco-classes" +version = "3.4.0" +description = "Utility functions for Python class constructs" +optional = false +python-versions = ">=3.8" +files = [ + {file = "jaraco.classes-3.4.0-py3-none-any.whl", hash = "sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790"}, + {file = "jaraco.classes-3.4.0.tar.gz", hash = "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd"}, +] + +[package.dependencies] +more-itertools = "*" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] + [[package]] name = "jax" version = "0.4.31" @@ -1321,13 +1583,13 @@ files = [ jaxlib = ">=0.4.30,<=0.4.31" ml-dtypes = ">=0.2.0" numpy = [ - {version = ">=1.24", markers = "python_version < \"3.12\""}, {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, + {version = ">=1.24", markers = "python_version < \"3.12\""}, ] opt-einsum = "*" scipy = [ - {version = ">=1.10", markers = "python_version < \"3.12\""}, {version = ">=1.11.1", markers = "python_version >= \"3.12\""}, + {version = ">=1.10", markers = "python_version < \"3.12\""}, ] [package.extras] @@ -1367,10 +1629,25 @@ files = [ ml-dtypes = ">=0.2.0" numpy = ">=1.24" scipy = [ - {version = ">=1.10", markers = "python_version < \"3.12\""}, {version = ">=1.11.1", markers = "python_version >= \"3.12\""}, + {version = ">=1.10", markers = "python_version < \"3.12\""}, +] + +[[package]] +name = "jeepney" +version = "0.8.0" +description = "Low-level, pure Python DBus protocol wrapper." +optional = false +python-versions = ">=3.7" +files = [ + {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, + {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, ] +[package.extras] +test = ["async-timeout", "pytest", "pytest-asyncio (>=0.17)", "pytest-trio", "testpath", "trio"] +trio = ["async_generator", "trio"] + [[package]] name = "jinja2" version = "3.1.4" @@ -1518,6 +1795,29 @@ files = [ [package.dependencies] referencing = ">=0.31.0" +[[package]] +name = "keyring" +version = "24.3.1" +description = "Store and access your passwords safely." +optional = false +python-versions = ">=3.8" +files = [ + {file = "keyring-24.3.1-py3-none-any.whl", hash = "sha256:df38a4d7419a6a60fea5cef1e45a948a3e8430dd12ad88b0f423c5c143906218"}, + {file = "keyring-24.3.1.tar.gz", hash = "sha256:c3327b6ffafc0e8befbdb597cacdb4928ffe5c1212f7645f186e6d9957a898db"}, +] + +[package.dependencies] +importlib-metadata = {version = ">=4.11.4", markers = "python_version < \"3.12\""} +"jaraco.classes" = "*" +jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} +pywin32-ctypes = {version = ">=0.2.0", markers = "sys_platform == \"win32\""} +SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} + +[package.extras] +completion = ["shtab (>=1.1.0)"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] + [[package]] name = "kiwisolver" version = "1.4.5" @@ -1649,8 +1949,8 @@ langchain-core = ">=0.2.32,<0.3.0" langchain-text-splitters = ">=0.2.0,<0.3.0" langsmith = ">=0.1.17,<0.2.0" numpy = [ - {version = ">=1,<2", markers = "python_version < \"3.12\""}, {version = ">=1.26.0,<2.0.0", markers = "python_version >= \"3.12\""}, + {version = ">=1,<2", markers = "python_version < \"3.12\""}, ] pydantic = ">=1,<3" PyYAML = ">=5.3" @@ -1676,8 +1976,8 @@ langchain = ">=0.2.13,<0.3.0" langchain-core = ">=0.2.30,<0.3.0" langsmith = ">=0.1.0,<0.2.0" numpy = [ - {version = ">=1,<2", markers = "python_version < \"3.12\""}, {version = ">=1.26.0,<2.0.0", markers = "python_version >= \"3.12\""}, + {version = ">=1,<2", markers = "python_version < \"3.12\""}, ] PyYAML = ">=5.3" requests = ">=2,<3" @@ -2011,14 +2311,25 @@ files = [ [package.dependencies] numpy = [ - {version = ">=1.21.2", markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, - {version = ">=1.23.3", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, + {version = ">=1.23.3", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, + {version = ">=1.21.2", markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, ] [package.extras] dev = ["absl-py", "pyink", "pylint (>=2.6.0)", "pytest", "pytest-xdist"] +[[package]] +name = "more-itertools" +version = "10.4.0" +description = "More routines for operating on iterables, beyond itertools" +optional = false +python-versions = ">=3.8" +files = [ + {file = "more-itertools-10.4.0.tar.gz", hash = "sha256:fe0e63c4ab068eac62410ab05cccca2dc71ec44ba8ef29916a0090df061cf923"}, + {file = "more_itertools-10.4.0-py3-none-any.whl", hash = "sha256:0f7d9f83a0a8dcfa8a2694a770590d98a67ea943e3d9f5298309a484758c4e27"}, +] + [[package]] name = "mpmath" version = "1.3.0" @@ -2070,6 +2381,27 @@ files = [ msal = ">=1.29,<2" portalocker = ">=1.4,<3" +[[package]] +name = "msrest" +version = "0.7.1" +description = "AutoRest swagger generator Python client runtime." +optional = false +python-versions = ">=3.6" +files = [ + {file = "msrest-0.7.1-py3-none-any.whl", hash = "sha256:21120a810e1233e5e6cc7fe40b474eeb4ec6f757a15d7cf86702c369f9567c32"}, + {file = "msrest-0.7.1.zip", hash = "sha256:6e7661f46f3afd88b75667b7187a92829924446c7ea1d169be8c4bb7eeb788b9"}, +] + +[package.dependencies] +azure-core = ">=1.24.0" +certifi = ">=2017.4.17" +isodate = ">=0.6.0" +requests = ">=2.16,<3.0" +requests-oauthlib = ">=0.5.0" + +[package.extras] +async = ["aiodns", "aiohttp (>=3.0)"] + [[package]] name = "multidict" version = "6.0.5" @@ -2401,6 +2733,22 @@ files = [ {file = "nvidia_nvtx_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:65f4d98982b31b60026e0e6de73fbdfc09d08a96f4656dd3665ca616a11e1e82"}, ] +[[package]] +name = "oauthlib" +version = "3.2.2" +description = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic" +optional = false +python-versions = ">=3.6" +files = [ + {file = "oauthlib-3.2.2-py3-none-any.whl", hash = "sha256:8139f29aac13e25d502680e9e19963e83f16838d48a0d71c287fe40e7067fbca"}, + {file = "oauthlib-3.2.2.tar.gz", hash = "sha256:9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918"}, +] + +[package.extras] +rsa = ["cryptography (>=3.0.0)"] +signals = ["blinker (>=1.4.0)"] +signedtoken = ["cryptography (>=3.0.0)", "pyjwt (>=2.0.0,<3)"] + [[package]] name = "openai" version = "1.42.0" @@ -2443,10 +2791,10 @@ files = [ [package.dependencies] numpy = [ + {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, + {version = ">=1.23.5", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\" and python_version < \"3.11\""}, {version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\" and python_version < \"3.11\""}, - {version = ">=1.23.5", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, - {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, ] [[package]] @@ -2467,10 +2815,10 @@ files = [ [package.dependencies] numpy = [ + {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, + {version = ">=1.23.5", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\" and python_version < \"3.11\""}, {version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\" and python_version < \"3.11\""}, - {version = ">=1.23.5", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, - {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, ] [[package]] @@ -2491,12 +2839,106 @@ files = [ [package.dependencies] numpy = [ + {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, + {version = ">=1.23.5", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\" and python_version < \"3.11\""}, {version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\" and python_version < \"3.11\""}, - {version = ">=1.23.5", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, - {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, ] +[[package]] +name = "opentelemetry-api" +version = "1.27.0" +description = "OpenTelemetry Python API" +optional = false +python-versions = ">=3.8" +files = [ + {file = "opentelemetry_api-1.27.0-py3-none-any.whl", hash = "sha256:953d5871815e7c30c81b56d910c707588000fff7a3ca1c73e6531911d53065e7"}, + {file = "opentelemetry_api-1.27.0.tar.gz", hash = "sha256:ed673583eaa5f81b5ce5e86ef7cdaf622f88ef65f0b9aab40b843dcae5bef342"}, +] + +[package.dependencies] +deprecated = ">=1.2.6" +importlib-metadata = ">=6.0,<=8.4.0" + +[[package]] +name = "opentelemetry-exporter-otlp-proto-common" +version = "1.27.0" +description = "OpenTelemetry Protobuf encoding" +optional = false +python-versions = ">=3.8" +files = [ + {file = "opentelemetry_exporter_otlp_proto_common-1.27.0-py3-none-any.whl", hash = "sha256:675db7fffcb60946f3a5c43e17d1168a3307a94a930ecf8d2ea1f286f3d4f79a"}, + {file = "opentelemetry_exporter_otlp_proto_common-1.27.0.tar.gz", hash = "sha256:159d27cf49f359e3798c4c3eb8da6ef4020e292571bd8c5604a2a573231dd5c8"}, +] + +[package.dependencies] +opentelemetry-proto = "1.27.0" + +[[package]] +name = "opentelemetry-exporter-otlp-proto-http" +version = "1.27.0" +description = "OpenTelemetry Collector Protobuf over HTTP Exporter" +optional = false +python-versions = ">=3.8" +files = [ + {file = "opentelemetry_exporter_otlp_proto_http-1.27.0-py3-none-any.whl", hash = "sha256:688027575c9da42e179a69fe17e2d1eba9b14d81de8d13553a21d3114f3b4d75"}, + {file = "opentelemetry_exporter_otlp_proto_http-1.27.0.tar.gz", hash = "sha256:2103479092d8eb18f61f3fbff084f67cc7f2d4a7d37e75304b8b56c1d09ebef5"}, +] + +[package.dependencies] +deprecated = ">=1.2.6" +googleapis-common-protos = ">=1.52,<2.0" +opentelemetry-api = ">=1.15,<2.0" +opentelemetry-exporter-otlp-proto-common = "1.27.0" +opentelemetry-proto = "1.27.0" +opentelemetry-sdk = ">=1.27.0,<1.28.0" +requests = ">=2.7,<3.0" + +[[package]] +name = "opentelemetry-proto" +version = "1.27.0" +description = "OpenTelemetry Python Proto" +optional = false +python-versions = ">=3.8" +files = [ + {file = "opentelemetry_proto-1.27.0-py3-none-any.whl", hash = "sha256:b133873de5581a50063e1e4b29cdcf0c5e253a8c2d8dc1229add20a4c3830ace"}, + {file = "opentelemetry_proto-1.27.0.tar.gz", hash = "sha256:33c9345d91dafd8a74fc3d7576c5a38f18b7fdf8d02983ac67485386132aedd6"}, +] + +[package.dependencies] +protobuf = ">=3.19,<5.0" + +[[package]] +name = "opentelemetry-sdk" +version = "1.27.0" +description = "OpenTelemetry Python SDK" +optional = false +python-versions = ">=3.8" +files = [ + {file = "opentelemetry_sdk-1.27.0-py3-none-any.whl", hash = "sha256:365f5e32f920faf0fd9e14fdfd92c086e317eaa5f860edba9cdc17a380d9197d"}, + {file = "opentelemetry_sdk-1.27.0.tar.gz", hash = "sha256:d525017dea0ccce9ba4e0245100ec46ecdc043f2d7b8315d56b19aff0904fa6f"}, +] + +[package.dependencies] +opentelemetry-api = "1.27.0" +opentelemetry-semantic-conventions = "0.48b0" +typing-extensions = ">=3.7.4" + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.48b0" +description = "OpenTelemetry Semantic Conventions" +optional = false +python-versions = ">=3.8" +files = [ + {file = "opentelemetry_semantic_conventions-0.48b0-py3-none-any.whl", hash = "sha256:a0de9f45c413a8669788a38569c7e0a11ce6ce97861a628cca785deecdc32a1f"}, + {file = "opentelemetry_semantic_conventions-0.48b0.tar.gz", hash = "sha256:12d74983783b6878162208be57c9effcb89dc88691c64992d70bb89dc00daa1a"}, +] + +[package.dependencies] +deprecated = ">=1.2.6" +opentelemetry-api = "1.27.0" + [[package]] name = "opt-einsum" version = "3.3.0" @@ -2552,8 +2994,6 @@ files = [ {file = "orjson-3.10.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:960db0e31c4e52fa0fc3ecbaea5b2d3b58f379e32a95ae6b0ebeaa25b93dfd34"}, {file = "orjson-3.10.6-cp312-none-win32.whl", hash = "sha256:a6ea7afb5b30b2317e0bee03c8d34c8181bc5a36f2afd4d0952f378972c4efd5"}, {file = "orjson-3.10.6-cp312-none-win_amd64.whl", hash = "sha256:874ce88264b7e655dde4aeaacdc8fd772a7962faadfb41abe63e2a4861abc3dc"}, - {file = "orjson-3.10.6-cp313-none-win32.whl", hash = "sha256:efdf2c5cde290ae6b83095f03119bdc00303d7a03b42b16c54517baa3c4ca3d0"}, - {file = "orjson-3.10.6-cp313-none-win_amd64.whl", hash = "sha256:8e190fe7888e2e4392f52cafb9626113ba135ef53aacc65cd13109eb9746c43e"}, {file = "orjson-3.10.6-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:66680eae4c4e7fc193d91cfc1353ad6d01b4801ae9b5314f17e11ba55e934183"}, {file = "orjson-3.10.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:caff75b425db5ef8e8f23af93c80f072f97b4fb3afd4af44482905c9f588da28"}, {file = "orjson-3.10.6-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3722fddb821b6036fd2a3c814f6bd9b57a89dc6337b9924ecd614ebce3271394"}, @@ -2628,9 +3068,9 @@ files = [ [package.dependencies] numpy = [ - {version = ">=1.22.4", markers = "python_version < \"3.11\""}, - {version = ">=1.23.2", markers = "python_version == \"3.11\""}, {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, + {version = ">=1.23.2", markers = "python_version == \"3.11\""}, + {version = ">=1.22.4", markers = "python_version < \"3.11\""}, ] python-dateutil = ">=2.8.2" pytz = ">=2020.1" @@ -2851,6 +3291,105 @@ nodeenv = ">=0.11.1" pyyaml = ">=5.1" virtualenv = ">=20.10.0" +[[package]] +name = "promptflow" +version = "1.15.0" +description = "Prompt flow Python SDK - build high-quality LLM apps" +optional = false +python-versions = "<4.0,>=3.8" +files = [ + {file = "promptflow-1.15.0-py3-none-any.whl", hash = "sha256:f953175295a9da7409127da9759f1e2e2093834b2a9207f455f82bb8048f99e9"}, +] + +[package.dependencies] +promptflow-core = "1.15.0" +promptflow-devkit = "1.15.0" +promptflow-tracing = "1.15.0" + +[package.extras] +all = ["promptflow-azure (==1.15.0)", "promptflow-core[executor-service] (==1.15.0)", "promptflow-devkit[all] (==1.15.0)"] +azure = ["promptflow-azure (==1.15.0)"] +azureml-serving = ["promptflow-core[azureml-serving] (==1.15.0)"] +executable = ["promptflow-devkit[executable] (==1.15.0)"] +executor-service = ["promptflow-core[executor-service] (==1.15.0)"] + +[[package]] +name = "promptflow-core" +version = "1.15.0" +description = "Prompt flow core" +optional = false +python-versions = "<4.0,>=3.8" +files = [ + {file = "promptflow_core-1.15.0-py3-none-any.whl", hash = "sha256:46674e52eef0541509f6dc69b2203e63f711aacddd5aa06c7b55359f9fefbfeb"}, +] + +[package.dependencies] +docstring_parser = "*" +fastapi = ">=0.109.0,<1.0.0" +filetype = ">=1.2.0" +flask = ">=2.2.3,<4.0.0" +jsonschema = ">=4.0.0,<5.0.0" +promptflow-tracing = "1.15.0" +psutil = "*" +python-dateutil = ">=2.1.0,<3.0.0" +"ruamel.yaml" = ">=0.17.10,<1.0.0" + +[package.extras] +azureml-serving = ["azure-ai-ml (>=1.14.0,<2.0.0)", "azure-identity (>=1.12.0,<2.0.0)", "azureml-ai-monitoring (>=0.1.0b3,<1.0.0)"] + +[[package]] +name = "promptflow-devkit" +version = "1.15.0" +description = "Prompt flow devkit" +optional = false +python-versions = "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8" +files = [ + {file = "promptflow_devkit-1.15.0-py3-none-any.whl", hash = "sha256:7c9f3286b8e745e70d8513c449c47ec8db7d0f5d3b2934b33533d7009fea1dfd"}, +] + +[package.dependencies] +argcomplete = ">=3.2.3" +azure-monitor-opentelemetry-exporter = ">=1.0.0b21,<2.0.0" +colorama = ">=0.4.6,<0.5.0" +cryptography = ">=42.0.4" +filelock = ">=3.4.0,<4.0.0" +flask-cors = ">=4.0.0,<5.0.0" +flask-restx = ">=1.2.0,<2.0.0" +gitpython = ">=3.1.24,<4.0.0" +httpx = ">=0.25.1" +keyring = ">=24.2.0,<25.0.0" +marshmallow = ">=3.5,<4.0.0" +opentelemetry-exporter-otlp-proto-http = ">=1.22.0,<2.0.0" +pandas = ">=1.5.3,<3.0.0" +pillow = ">=10.1.0,<11.0.0" +promptflow-core = ">=1.15.0,<2.0.0" +pydash = ">=6.0.0,<8.0.0" +python-dotenv = ">=1.0.0,<2.0.0" +pywin32 = {version = "*", markers = "sys_platform == \"win32\""} +sqlalchemy = ">=1.4.48,<3.0.0" +strictyaml = ">=1.5.0,<2.0.0" +tabulate = ">=0.9.0,<1.0.0" +waitress = ">=2.1.2,<3.0.0" + +[package.extras] +executable = ["bs4", "pyarrow (>=14.0.1,<15.0.0)", "pyinstaller (>=5.13.2)", "streamlit (>=1.26.0)", "streamlit-quill (<0.1.0)"] +pyarrow = ["pyarrow (>=14.0.1,<15.0.0)"] + +[[package]] +name = "promptflow-tracing" +version = "1.15.0" +description = "Prompt flow tracing" +optional = false +python-versions = "<4.0,>=3.8" +files = [ + {file = "promptflow_tracing-1.15.0-py3-none-any.whl", hash = "sha256:776be489a2d8d70c3434d361c9576b4be1abd72b20912406fee02bca785d33ca"}, +] + +[package.dependencies] +openai = "*" +opentelemetry-sdk = ">=1.22.0,<2.0.0" +tiktoken = ">=0.4.0" + [[package]] name = "protobuf" version = "4.25.4" @@ -3096,6 +3635,23 @@ files = [ [package.dependencies] typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" +[[package]] +name = "pydash" +version = "7.0.7" +description = "The kitchen sink of Python utility libraries for doing \"stuff\" in a functional way. Based on the Lo-Dash Javascript library." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydash-7.0.7-py3-none-any.whl", hash = "sha256:c3c5b54eec0a562e0080d6f82a14ad4d5090229847b7e554235b5c1558c745e1"}, + {file = "pydash-7.0.7.tar.gz", hash = "sha256:cc935d5ac72dd41fb4515bdf982e7c864c8b5eeea16caffbab1936b849aaa49a"}, +] + +[package.dependencies] +typing-extensions = ">=3.10,<4.6.0 || >4.6.0" + +[package.extras] +dev = ["black", "build", "coverage", "docformatter", "flake8", "flake8-black", "flake8-bugbear", "flake8-isort", "furo", "invoke", "isort", "mypy", "pylint", "pytest", "pytest-cov", "pytest-mypy-testing", "sphinx", "sphinx-autodoc-typehints", "tox", "twine", "wheel"] + [[package]] name = "pydeck" version = "0.9.1" @@ -3265,6 +3821,17 @@ files = [ {file = "pywin32-306-cp39-cp39-win_amd64.whl", hash = "sha256:39b61c15272833b5c329a2989999dcae836b1eed650252ab1b7bfbe1d59f30f4"}, ] +[[package]] +name = "pywin32-ctypes" +version = "0.2.3" +description = "A (partial) reimplementation of pywin32 using ctypes/cffi" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pywin32-ctypes-0.2.3.tar.gz", hash = "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755"}, + {file = "pywin32_ctypes-0.2.3-py3-none-any.whl", hash = "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8"}, +] + [[package]] name = "pyyaml" version = "6.0.1" @@ -3449,6 +4016,24 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] +[[package]] +name = "requests-oauthlib" +version = "2.0.0" +description = "OAuthlib authentication support for Requests." +optional = false +python-versions = ">=3.4" +files = [ + {file = "requests-oauthlib-2.0.0.tar.gz", hash = "sha256:b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9"}, + {file = "requests_oauthlib-2.0.0-py2.py3-none-any.whl", hash = "sha256:7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36"}, +] + +[package.dependencies] +oauthlib = ">=3.0.0" +requests = ">=2.0.0" + +[package.extras] +rsa = ["oauthlib[signedtoken] (>=3.0.0)"] + [[package]] name = "rich" version = "13.7.1" @@ -3579,6 +4164,83 @@ files = [ {file = "rpds_py-0.19.1.tar.gz", hash = "sha256:31dd5794837f00b46f4096aa8ccaa5972f73a938982e32ed817bb520c465e520"}, ] +[[package]] +name = "ruamel-yaml" +version = "0.18.6" +description = "ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order" +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruamel.yaml-0.18.6-py3-none-any.whl", hash = "sha256:57b53ba33def16c4f3d807c0ccbc00f8a6081827e81ba2491691b76882d0c636"}, + {file = "ruamel.yaml-0.18.6.tar.gz", hash = "sha256:8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b"}, +] + +[package.dependencies] +"ruamel.yaml.clib" = {version = ">=0.2.7", markers = "platform_python_implementation == \"CPython\" and python_version < \"3.13\""} + +[package.extras] +docs = ["mercurial (>5.7)", "ryd"] +jinja2 = ["ruamel.yaml.jinja2 (>=0.2)"] + +[[package]] +name = "ruamel-yaml-clib" +version = "0.2.8" +description = "C version of reader, parser and emitter for ruamel.yaml derived from libyaml" +optional = false +python-versions = ">=3.6" +files = [ + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b42169467c42b692c19cf539c38d4602069d8c1505e97b86387fcf7afb766e1d"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-macosx_13_0_arm64.whl", hash = "sha256:07238db9cbdf8fc1e9de2489a4f68474e70dffcb32232db7c08fa61ca0c7c462"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:fff3573c2db359f091e1589c3d7c5fc2f86f5bdb6f24252c2d8e539d4e45f412"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-manylinux_2_24_aarch64.whl", hash = "sha256:aa2267c6a303eb483de8d02db2871afb5c5fc15618d894300b88958f729ad74f"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:840f0c7f194986a63d2c2465ca63af8ccbbc90ab1c6001b1978f05119b5e7334"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:024cfe1fc7c7f4e1aff4a81e718109e13409767e4f871443cbff3dba3578203d"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-win32.whl", hash = "sha256:c69212f63169ec1cfc9bb44723bf2917cbbd8f6191a00ef3410f5a7fe300722d"}, + {file = "ruamel.yaml.clib-0.2.8-cp310-cp310-win_amd64.whl", hash = "sha256:cabddb8d8ead485e255fe80429f833172b4cadf99274db39abc080e068cbcc31"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:bef08cd86169d9eafb3ccb0a39edb11d8e25f3dae2b28f5c52fd997521133069"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:b16420e621d26fdfa949a8b4b47ade8810c56002f5389970db4ddda51dbff248"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:25c515e350e5b739842fc3228d662413ef28f295791af5e5110b543cf0b57d9b"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-manylinux_2_24_aarch64.whl", hash = "sha256:1707814f0d9791df063f8c19bb51b0d1278b8e9a2353abbb676c2f685dee6afe"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:46d378daaac94f454b3a0e3d8d78cafd78a026b1d71443f4966c696b48a6d899"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:09b055c05697b38ecacb7ac50bdab2240bfca1a0c4872b0fd309bb07dc9aa3a9"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-win32.whl", hash = "sha256:53a300ed9cea38cf5a2a9b069058137c2ca1ce658a874b79baceb8f892f915a7"}, + {file = "ruamel.yaml.clib-0.2.8-cp311-cp311-win_amd64.whl", hash = "sha256:c2a72e9109ea74e511e29032f3b670835f8a59bbdc9ce692c5b4ed91ccf1eedb"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:ebc06178e8821efc9692ea7544aa5644217358490145629914d8020042c24aa1"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-macosx_13_0_arm64.whl", hash = "sha256:edaef1c1200c4b4cb914583150dcaa3bc30e592e907c01117c08b13a07255ec2"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d176b57452ab5b7028ac47e7b3cf644bcfdc8cacfecf7e71759f7f51a59e5c92"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-manylinux_2_24_aarch64.whl", hash = "sha256:1dc67314e7e1086c9fdf2680b7b6c2be1c0d8e3a8279f2e993ca2a7545fecf62"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:3213ece08ea033eb159ac52ae052a4899b56ecc124bb80020d9bbceeb50258e9"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:aab7fd643f71d7946f2ee58cc88c9b7bfc97debd71dcc93e03e2d174628e7e2d"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-win32.whl", hash = "sha256:5c365d91c88390c8d0a8545df0b5857172824b1c604e867161e6b3d59a827eaa"}, + {file = "ruamel.yaml.clib-0.2.8-cp312-cp312-win_amd64.whl", hash = "sha256:1758ce7d8e1a29d23de54a16ae867abd370f01b5a69e1a3ba75223eaa3ca1a1b"}, + {file = "ruamel.yaml.clib-0.2.8-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:a5aa27bad2bb83670b71683aae140a1f52b0857a2deff56ad3f6c13a017a26ed"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c58ecd827313af6864893e7af0a3bb85fd529f862b6adbefe14643947cfe2942"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-macosx_12_0_arm64.whl", hash = "sha256:f481f16baec5290e45aebdc2a5168ebc6d35189ae6fea7a58787613a25f6e875"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-manylinux_2_24_aarch64.whl", hash = "sha256:77159f5d5b5c14f7c34073862a6b7d34944075d9f93e681638f6d753606c6ce6"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:7f67a1ee819dc4562d444bbafb135832b0b909f81cc90f7aa00260968c9ca1b3"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:4ecbf9c3e19f9562c7fdd462e8d18dd902a47ca046a2e64dba80699f0b6c09b7"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:87ea5ff66d8064301a154b3933ae406b0863402a799b16e4a1d24d9fbbcbe0d3"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-win32.whl", hash = "sha256:75e1ed13e1f9de23c5607fe6bd1aeaae21e523b32d83bb33918245361e9cc51b"}, + {file = "ruamel.yaml.clib-0.2.8-cp37-cp37m-win_amd64.whl", hash = "sha256:3f215c5daf6a9d7bbed4a0a4f760f3113b10e82ff4c5c44bec20a68c8014f675"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1b617618914cb00bf5c34d4357c37aa15183fa229b24767259657746c9077615"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-macosx_12_0_arm64.whl", hash = "sha256:a6a9ffd280b71ad062eae53ac1659ad86a17f59a0fdc7699fd9be40525153337"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-manylinux_2_24_aarch64.whl", hash = "sha256:305889baa4043a09e5b76f8e2a51d4ffba44259f6b4c72dec8ca56207d9c6fe1"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:700e4ebb569e59e16a976857c8798aee258dceac7c7d6b50cab63e080058df91"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:e2b4c44b60eadec492926a7270abb100ef9f72798e18743939bdbf037aab8c28"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e79e5db08739731b0ce4850bed599235d601701d5694c36570a99a0c5ca41a9d"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-win32.whl", hash = "sha256:955eae71ac26c1ab35924203fda6220f84dce57d6d7884f189743e2abe3a9fbe"}, + {file = "ruamel.yaml.clib-0.2.8-cp38-cp38-win_amd64.whl", hash = "sha256:56f4252222c067b4ce51ae12cbac231bce32aee1d33fbfc9d17e5b8d6966c312"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:03d1162b6d1df1caa3a4bd27aa51ce17c9afc2046c31b0ad60a0a96ec22f8001"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:bba64af9fa9cebe325a62fa398760f5c7206b215201b0ec825005f1b18b9bccf"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-manylinux_2_24_aarch64.whl", hash = "sha256:a1a45e0bb052edf6a1d3a93baef85319733a888363938e1fc9924cb00c8df24c"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:da09ad1c359a728e112d60116f626cc9f29730ff3e0e7db72b9a2dbc2e4beed5"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:184565012b60405d93838167f425713180b949e9d8dd0bbc7b49f074407c5a8b"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a75879bacf2c987c003368cf14bed0ffe99e8e85acfa6c0bfffc21a090f16880"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-win32.whl", hash = "sha256:84b554931e932c46f94ab306913ad7e11bba988104c5cff26d90d03f68258cd5"}, + {file = "ruamel.yaml.clib-0.2.8-cp39-cp39-win_amd64.whl", hash = "sha256:25ac8c08322002b06fa1d49d1646181f0b2c72f5cbc15a85e80b4c30a544bb15"}, + {file = "ruamel.yaml.clib-0.2.8.tar.gz", hash = "sha256:beb2e0404003de9a4cab9753a8805a8fe9320ee6673136ed7f04255fe60bb512"}, +] + [[package]] name = "ruff" version = "0.6.2" @@ -3669,6 +4331,21 @@ dev = ["flake8", "flit", "mypy", "pandas-stubs", "pre-commit", "pytest", "pytest docs = ["ipykernel", "nbconvert", "numpydoc", "pydata_sphinx_theme (==0.10.0rc2)", "pyyaml", "sphinx (<6.0.0)", "sphinx-copybutton", "sphinx-design", "sphinx-issues"] stats = ["scipy (>=1.7)", "statsmodels (>=0.12)"] +[[package]] +name = "secretstorage" +version = "3.3.3" +description = "Python bindings to FreeDesktop.org Secret Service API" +optional = false +python-versions = ">=3.6" +files = [ + {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, + {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, +] + +[package.dependencies] +cryptography = ">=2.0" +jeepney = ">=0.6" + [[package]] name = "setuptools" version = "70.0.0" @@ -3824,6 +4501,23 @@ postgresql-psycopgbinary = ["psycopg[binary] (>=3.0.7)"] pymysql = ["pymysql"] sqlcipher = ["sqlcipher3_binary"] +[[package]] +name = "starlette" +version = "0.38.2" +description = "The little ASGI library that shines." +optional = false +python-versions = ">=3.8" +files = [ + {file = "starlette-0.38.2-py3-none-any.whl", hash = "sha256:4ec6a59df6bbafdab5f567754481657f7ed90dc9d69b0c9ff017907dd54faeff"}, + {file = "starlette-0.38.2.tar.gz", hash = "sha256:c7c0441065252160993a1a37cf2a73bb64d271b17303e0b0c1eb7191cfb12d75"}, +] + +[package.dependencies] +anyio = ">=3.4.0,<5" + +[package.extras] +full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7)", "pyyaml"] + [[package]] name = "streamlit" version = "1.37.1" @@ -3859,6 +4553,20 @@ watchdog = {version = ">=2.1.5,<5", markers = "platform_system != \"Darwin\""} [package.extras] snowflake = ["snowflake-connector-python (>=2.8.0)", "snowflake-snowpark-python (>=0.9.0)"] +[[package]] +name = "strictyaml" +version = "1.7.3" +description = "Strict, typed YAML parser" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "strictyaml-1.7.3-py3-none-any.whl", hash = "sha256:fb5c8a4edb43bebb765959e420f9b3978d7f1af88c80606c03fb420888f5d1c7"}, + {file = "strictyaml-1.7.3.tar.gz", hash = "sha256:22f854a5fcab42b5ddba8030a0e4be51ca89af0267961c8d6cfa86395586c407"}, +] + +[package.dependencies] +python-dateutil = ">=2.6.0" + [[package]] name = "sympy" version = "1.13.2" @@ -3876,6 +4584,20 @@ mpmath = ">=1.1.0,<1.4" [package.extras] dev = ["hypothesis (>=6.70.0)", "pytest (>=7.1.0)"] +[[package]] +name = "tabulate" +version = "0.9.0" +description = "Pretty-print tabular data" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tabulate-0.9.0-py3-none-any.whl", hash = "sha256:024ca478df22e9340661486f85298cff5f6dcdba14f3813e8830015b9ed1948f"}, + {file = "tabulate-0.9.0.tar.gz", hash = "sha256:0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c"}, +] + +[package.extras] +widechars = ["wcwidth"] + [[package]] name = "tenacity" version = "8.5.0" @@ -4124,6 +4846,11 @@ files = [ {file = "triton-3.0.0-1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:34e509deb77f1c067d8640725ef00c5cbfcb2052a1a3cb6a6d343841f92624eb"}, {file = "triton-3.0.0-1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bcbf3b1c48af6a28011a5c40a5b3b9b5330530c3827716b5fbf6d7adcc1e53e9"}, {file = "triton-3.0.0-1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6e5727202f7078c56f91ff13ad0c1abab14a0e7f2c87e91b12b6f64f3e8ae609"}, + {file = "triton-3.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39b052da883351fdf6be3d93cedae6db3b8e3988d3b09ed221bccecfa9612230"}, + {file = "triton-3.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd34f19a8582af96e6291d4afce25dac08cb2a5d218c599163761e8e0827208e"}, + {file = "triton-3.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d5e10de8c011adeb7c878c6ce0dd6073b14367749e34467f1cff2bde1b78253"}, + {file = "triton-3.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8903767951bf86ec960b4fe4e21bc970055afc65e9d57e916d79ae3c93665e3"}, + {file = "triton-3.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41004fb1ae9a53fcb3e970745feb87f0e3c94c6ce1ba86e95fa3b8537894bef7"}, ] [package.dependencies] @@ -4258,6 +4985,21 @@ platformdirs = ">=3.9.1,<5" docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] +[[package]] +name = "waitress" +version = "2.1.2" +description = "Waitress WSGI server" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "waitress-2.1.2-py3-none-any.whl", hash = "sha256:7500c9625927c8ec60f54377d590f67b30c8e70ef4b8894214ac6e4cad233d2a"}, + {file = "waitress-2.1.2.tar.gz", hash = "sha256:780a4082c5fbc0fde6a2fcfe5e26e6efc1e8f425730863c04085769781f51eba"}, +] + +[package.extras] +docs = ["Sphinx (>=1.8.1)", "docutils", "pylons-sphinx-themes (>=1.0.9)"] +testing = ["coverage (>=5.0)", "pytest", "pytest-cover"] + [[package]] name = "watchdog" version = "4.0.1" @@ -4302,6 +5044,102 @@ files = [ [package.extras] watchmedo = ["PyYAML (>=3.10)"] +[[package]] +name = "werkzeug" +version = "3.0.4" +description = "The comprehensive WSGI web application library." +optional = false +python-versions = ">=3.8" +files = [ + {file = "werkzeug-3.0.4-py3-none-any.whl", hash = "sha256:02c9eb92b7d6c06f31a782811505d2157837cea66aaede3e217c7c27c039476c"}, + {file = "werkzeug-3.0.4.tar.gz", hash = "sha256:34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306"}, +] + +[package.dependencies] +MarkupSafe = ">=2.1.1" + +[package.extras] +watchdog = ["watchdog (>=2.3)"] + +[[package]] +name = "wrapt" +version = "1.16.0" +description = "Module for decorators, wrappers and monkey patching." +optional = false +python-versions = ">=3.6" +files = [ + {file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"}, + {file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136"}, + {file = "wrapt-1.16.0-cp310-cp310-win32.whl", hash = "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d"}, + {file = "wrapt-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d"}, + {file = "wrapt-1.16.0-cp311-cp311-win32.whl", hash = "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362"}, + {file = "wrapt-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c"}, + {file = "wrapt-1.16.0-cp312-cp312-win32.whl", hash = "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc"}, + {file = "wrapt-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8"}, + {file = "wrapt-1.16.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465"}, + {file = "wrapt-1.16.0-cp36-cp36m-win32.whl", hash = "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e"}, + {file = "wrapt-1.16.0-cp36-cp36m-win_amd64.whl", hash = "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966"}, + {file = "wrapt-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win32.whl", hash = "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win_amd64.whl", hash = "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6"}, + {file = "wrapt-1.16.0-cp38-cp38-win32.whl", hash = "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b"}, + {file = "wrapt-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537"}, + {file = "wrapt-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3"}, + {file = "wrapt-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35"}, + {file = "wrapt-1.16.0-py3-none-any.whl", hash = "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1"}, + {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, +] + [[package]] name = "yarl" version = "1.9.4" @@ -4405,7 +5243,26 @@ files = [ idna = ">=2.0" multidict = ">=4.0" +[[package]] +name = "zipp" +version = "3.20.1" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zipp-3.20.1-py3-none-any.whl", hash = "sha256:9960cd8967c8f85a56f920d5d507274e74f9ff813a0ab8889a5b5be2daf44064"}, + {file = "zipp-3.20.1.tar.gz", hash = "sha256:c22b14cc4763c5a5b04134207736c107db42e9d3ef2d9779d465f5f1bcba572b"}, +] + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +type = ["pytest-mypy"] + [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "89e27031d29c2dd7e67410cfe744cde0470aebcf9405616bd140de5e9110585b" +content-hash = "dfb3022b3b0c10d975b964eed5083f9471673f10a7255fc4a5d1cd17265ea8ab" diff --git a/pyproject.toml b/pyproject.toml index d5b0eaf..c804acf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ azure-ai-documentintelligence = "^1.0.0b3" azure-storage-blob = "^12.22.0" requests = "^2.32.3" opencv-python-headless = "^4.10.0.84" +promptflow = "^1.15.0" [tool.poetry.group.dev.dependencies] pre-commit = "^3.8.0" diff --git a/requirements.txt b/requirements.txt index 66a75b2..24c4e4a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,7 @@ azure-identity==1.17.1 azure-ai-documentintelligence==1.0.0b3 azure-storage-blob==12.22.0 requests==2.32.3 +promptflow==1.15.0 # To run 99_streamlit_examples/pages/10_Object_Detection.py # ultralytics==8.2.77 From 2ea0153ed5a2d9bbfac95f40af1f3df5e6eaada3 Mon Sep 17 00:00:00 2001 From: ks6088ts Date: Fri, 30 Aug 2024 13:40:02 +0900 Subject: [PATCH 2/7] poetry run pf flow init --flow playground --type chat --- apps/11_promptflow/playground/.gitignore | 5 ++ .../playground/.promptflow/flow.tools.json | 21 +++++ apps/11_promptflow/playground/README.md | 86 +++++++++++++++++++ .../playground/azure_openai.yaml | 6 ++ apps/11_promptflow/playground/chat.jinja2 | 12 +++ apps/11_promptflow/playground/flow.dag.yaml | 30 +++++++ apps/11_promptflow/playground/openai.yaml | 4 + .../11_promptflow/playground/requirements.txt | 1 + 8 files changed, 165 insertions(+) create mode 100644 apps/11_promptflow/playground/.gitignore create mode 100644 apps/11_promptflow/playground/.promptflow/flow.tools.json create mode 100644 apps/11_promptflow/playground/README.md create mode 100644 apps/11_promptflow/playground/azure_openai.yaml create mode 100644 apps/11_promptflow/playground/chat.jinja2 create mode 100644 apps/11_promptflow/playground/flow.dag.yaml create mode 100644 apps/11_promptflow/playground/openai.yaml create mode 100644 apps/11_promptflow/playground/requirements.txt diff --git a/apps/11_promptflow/playground/.gitignore b/apps/11_promptflow/playground/.gitignore new file mode 100644 index 0000000..61bd725 --- /dev/null +++ b/apps/11_promptflow/playground/.gitignore @@ -0,0 +1,5 @@ +.env +__pycache__/ +.promptflow/* +!.promptflow/flow.tools.json +.runs/ diff --git a/apps/11_promptflow/playground/.promptflow/flow.tools.json b/apps/11_promptflow/playground/.promptflow/flow.tools.json new file mode 100644 index 0000000..ded50d3 --- /dev/null +++ b/apps/11_promptflow/playground/.promptflow/flow.tools.json @@ -0,0 +1,21 @@ +{ + "package": {}, + "code": { + "chat.jinja2": { + "type": "llm", + "inputs": { + "question": { + "type": [ + "string" + ] + }, + "chat_history": { + "type": [ + "string" + ] + } + }, + "description": "Chat with Chatbot" + } + } +} diff --git a/apps/11_promptflow/playground/README.md b/apps/11_promptflow/playground/README.md new file mode 100644 index 0000000..e0de4af --- /dev/null +++ b/apps/11_promptflow/playground/README.md @@ -0,0 +1,86 @@ +# Chat flow +Chat flow is designed for conversational application development, building upon the capabilities of standard flow and providing enhanced support for chat inputs/outputs and chat history management. With chat flow, you can easily create a chatbot that handles chat input and output. + +## Create connection for LLM tool to use +You can follow these steps to create a connection required by a LLM tool. + +Currently, there are two connection types supported by LLM tool: "AzureOpenAI" and "OpenAI". If you want to use "AzureOpenAI" connection type, you need to create an Azure OpenAI service first. Please refer to [Azure OpenAI Service](https://azure.microsoft.com/en-us/products/cognitive-services/openai-service/) for more details. If you want to use "OpenAI" connection type, you need to create an OpenAI account first. Please refer to [OpenAI](https://platform.openai.com/) for more details. + +```bash +# Override keys with --set to avoid yaml file changes +# Create OpenAI connection +pf connection create --file openai.yaml --set api_key= --name open_ai_connection + +# Create azure OpenAI connection +# pf connection create --file azure_openai.yaml --set api_key= api_base= --name open_ai_connection +``` + +Note in [flow.dag.yaml](flow.dag.yaml) we are using connection named `open_ai_connection`. +```bash +# show registered connection +pf connection show --name open_ai_connection +``` +Please refer to connections [document](https://promptflow.azurewebsites.net/community/local/manage-connections.html) and [example](https://github.com/microsoft/promptflow/tree/main/examples/connections) for more details. + +## Develop a chat flow + +The most important elements that differentiate a chat flow from a standard flow are **Chat Input**, **Chat History**, and **Chat Output**. + +- **Chat Input**: Chat input refers to the messages or queries submitted by users to the chatbot. Effectively handling chat input is crucial for a successful conversation, as it involves understanding user intentions, extracting relevant information, and triggering appropriate responses. + +- **Chat History**: Chat history is the record of all interactions between the user and the chatbot, including both user inputs and AI-generated outputs. Maintaining chat history is essential for keeping track of the conversation context and ensuring the AI can generate contextually relevant responses. Chat History is a special type of chat flow input, that stores chat messages in a structured format. + +- **Chat Output**: Chat output refers to the AI-generated messages that are sent to the user in response to their inputs. Generating contextually appropriate and engaging chat outputs is vital for a positive user experience. + +A chat flow can have multiple inputs, but Chat History and Chat Input are required inputs in chat flow. + +## Interact with chat flow + +Promptflow CLI provides a way to start an interactive chat session for chat flow. Customer can use below command to start an interactive chat session: + +``` +pf flow test --flow --interactive +``` + +After executing this command, customer can interact with the chat flow in the terminal. Customer can press **Enter** to send the message to chat flow. And customer can quit with **ctrl+C**. +Promptflow CLI will distinguish the output of different roles by color, User input, Bot output, Flow script output, Node output. + +> =========================================
+> Welcome to chat flow, .
+> Press Enter to send your message.
+> You can quit with ctrl+C.
+> =========================================
+> User: What types of container software there are
+> Bot: There are several types of container software available, including:
+> 1. Docker: This is one of the most popular containerization software that allows developers to package their applications into containers and deploy them across different environments.
+> 2. Kubernetes: This is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications.
+> +> User: What's the different between them
+> Bot: The main difference between the various container software systems is their functionality and purpose. Here are some key differences between them:
+> 1. Docker is more focused on container packaging and deployment, while Kubernetes is more focused on container orchestration and management.
+> 2. Kubernetes: Kubernetes is a container orchestration tool that helps manage and deploy containers at scale. It automates the deployment, scaling, and management of containerized applications across multiple hosts.
+ +If customer adds "--verbose" in the pf command, the output of each step will be displayed. + +> =========================================
+> Welcome to chat flow, Template Chat Flow.
+> Press Enter to send your message.
+> You can quit with ctrl+C.
+> =========================================
+> User: What types of container software there are
+> chat: There are several types of container software available, including:
+> 1. Docker: A popular container platform that is widely used in the industry.
+> 2. Kubernetes: A container orchestration tool that helps manage and deploy containers at scale.
+> +> Bot: There are several types of container software available, including:
+> 1. Docker: A popular container platform that is widely used in the industry.
+> 2. Kubernetes: A container orchestration tool that helps manage and deploy containers at scale.
+> +> User: What's the different between them
+> chat: The main differences between container software are in their architecture, feature sets, and use cases. Here are some brief explanations of the differences between the examples I listed:
+> 1. Docker: Docker is a container platform that is widely used for building, packaging, and deploying containerized applications. It is known for its ease of use, portability, and large ecosystem of tools and services.
+> 2. Kubernetes: Kubernetes is a container orchestration tool that helps manage and deploy containers at scale. It automates the deployment, scaling, and management of containerized applications across multiple hosts.
+> +> Bot: The main differences between container software are in their architecture, feature sets, and use cases. Here are some brief explanations of the differences between the examples I listed:
+> 1. Docker: Docker is a container platform that is widely used for building, packaging, and deploying containerized applications. It is known for its ease of use, portability, and large ecosystem of tools and services.
+> 2. Kubernetes: Kubernetes is a container orchestration tool that helps manage and deploy containers at scale. It automates the deployment, scaling, and management of containerized applications across multiple hosts.
diff --git a/apps/11_promptflow/playground/azure_openai.yaml b/apps/11_promptflow/playground/azure_openai.yaml new file mode 100644 index 0000000..fde2b5c --- /dev/null +++ b/apps/11_promptflow/playground/azure_openai.yaml @@ -0,0 +1,6 @@ +$schema: https://azuremlschemas.azureedge.net/promptflow/latest/AzureOpenAIConnection.schema.json +name: open_ai_connection +type: azure_open_ai +api_key: "" +api_base: "" +api_type: "azure" diff --git a/apps/11_promptflow/playground/chat.jinja2 b/apps/11_promptflow/playground/chat.jinja2 new file mode 100644 index 0000000..b8f6d27 --- /dev/null +++ b/apps/11_promptflow/playground/chat.jinja2 @@ -0,0 +1,12 @@ +system: +You are a helpful assistant. + +{% for item in chat_history %} +user: +{{item.inputs.question}} +assistant: +{{item.outputs.answer}} +{% endfor %} + +user: +{{question}} diff --git a/apps/11_promptflow/playground/flow.dag.yaml b/apps/11_promptflow/playground/flow.dag.yaml new file mode 100644 index 0000000..6fe9c79 --- /dev/null +++ b/apps/11_promptflow/playground/flow.dag.yaml @@ -0,0 +1,30 @@ +$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json +inputs: + chat_history: + type: list + is_chat_history: true + default: [] + question: + type: string + is_chat_input: true +outputs: + answer: + type: string + reference: ${chat.output} + is_chat_output: true +nodes: +- name: chat + type: llm + source: + type: code + path: chat.jinja2 + inputs: + deployment_name: gpt-35-turbo + max_tokens: '256' + temperature: '0.7' + chat_history: ${inputs.chat_history} + question: ${inputs.question} + api: chat + connection: open_ai_connection +environment: + python_requirements_txt: requirements.txt diff --git a/apps/11_promptflow/playground/openai.yaml b/apps/11_promptflow/playground/openai.yaml new file mode 100644 index 0000000..ded72f5 --- /dev/null +++ b/apps/11_promptflow/playground/openai.yaml @@ -0,0 +1,4 @@ +$schema: https://azuremlschemas.azureedge.net/promptflow/latest/OpenAIConnection.schema.json +name: open_ai_connection +type: open_ai +api_key: "" diff --git a/apps/11_promptflow/playground/requirements.txt b/apps/11_promptflow/playground/requirements.txt new file mode 100644 index 0000000..7a54870 --- /dev/null +++ b/apps/11_promptflow/playground/requirements.txt @@ -0,0 +1 @@ +promptflow From 61e26016448431d8a96cb61d24e30c305f250ab2 Mon Sep 17 00:00:00 2001 From: ks6088ts Date: Fri, 30 Aug 2024 14:08:45 +0900 Subject: [PATCH 3/7] run playground flow --- apps/11_promptflow/README.md | 59 +++++++++++++++++++ .../playground/azure_openai.yaml | 1 + apps/11_promptflow/playground/data.jsonl | 3 + apps/11_promptflow/playground/flow.dag.yaml | 2 +- apps/11_promptflow/playground/openai.yaml | 4 -- 5 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 apps/11_promptflow/playground/data.jsonl delete mode 100644 apps/11_promptflow/playground/openai.yaml diff --git a/apps/11_promptflow/README.md b/apps/11_promptflow/README.md index dfb0331..d73ba53 100644 --- a/apps/11_promptflow/README.md +++ b/apps/11_promptflow/README.md @@ -66,6 +66,65 @@ $ pf run create \ --stream ``` +### playground + +```shell +cd apps/11_promptflow + +# Initialize a new flow +$ pf flow init \ + --flow playground \ + --type chat + +$ cd playground + +# Set parameters +$ CONNECTION_NAME=open_ai_connection +$ AZURE_OPENAI_KEY= +$ AZURE_OPENAI_ENDPOINT= + +# List connections +$ pf connection list + + +# Delete connection (if needed) +$ pf connection delete \ + --name $CONNECTION_NAME + +# Create connection +$ pf connection create \ + --file azure_openai.yaml \ + --set api_key=$AZURE_OPENAI_KEY \ + --set api_base=$AZURE_OPENAI_ENDPOINT \ + --name $CONNECTION_NAME + +# Show connection +$ pf connection show \ + --name $CONNECTION_NAME + +# Interact with chat flow +$ pf flow test \ + --flow . \ + --interactive + +# Test flow +$ pf flow test \ + --flow . \ + --inputs question="What's the capital of France?" + +# Create run with multiple lines data +$ RUN_NAME=playground-$(date +%s) +$ pf run create \ + --name $RUN_NAME \ + --flow . \ + --data ./data.jsonl \ + --column-mapping question='${data.question}' \ + --stream + +# Show run details +$ pf run show-details --name $RUN_NAME +``` + ## References - [Prompt flow > repos](https://github.com/microsoft/promptflow) diff --git a/apps/11_promptflow/playground/azure_openai.yaml b/apps/11_promptflow/playground/azure_openai.yaml index fde2b5c..0c6c048 100644 --- a/apps/11_promptflow/playground/azure_openai.yaml +++ b/apps/11_promptflow/playground/azure_openai.yaml @@ -4,3 +4,4 @@ type: azure_open_ai api_key: "" api_base: "" api_type: "azure" +api_version: "2024-07-01-preview" diff --git a/apps/11_promptflow/playground/data.jsonl b/apps/11_promptflow/playground/data.jsonl new file mode 100644 index 0000000..575eea7 --- /dev/null +++ b/apps/11_promptflow/playground/data.jsonl @@ -0,0 +1,3 @@ +{"question": "What's the capital of France?"} +{"question": "What's the capital of Japan?"} +{"question": "What's the capital of China?"} \ No newline at end of file diff --git a/apps/11_promptflow/playground/flow.dag.yaml b/apps/11_promptflow/playground/flow.dag.yaml index 6fe9c79..9efe06e 100644 --- a/apps/11_promptflow/playground/flow.dag.yaml +++ b/apps/11_promptflow/playground/flow.dag.yaml @@ -19,7 +19,7 @@ nodes: type: code path: chat.jinja2 inputs: - deployment_name: gpt-35-turbo + deployment_name: gpt-4o max_tokens: '256' temperature: '0.7' chat_history: ${inputs.chat_history} diff --git a/apps/11_promptflow/playground/openai.yaml b/apps/11_promptflow/playground/openai.yaml deleted file mode 100644 index ded72f5..0000000 --- a/apps/11_promptflow/playground/openai.yaml +++ /dev/null @@ -1,4 +0,0 @@ -$schema: https://azuremlschemas.azureedge.net/promptflow/latest/OpenAIConnection.schema.json -name: open_ai_connection -type: open_ai -api_key: "" From 466d9d2ef56c25a8c2a752b630e9ab2158e1aa45 Mon Sep 17 00:00:00 2001 From: ks6088ts Date: Fri, 30 Aug 2024 14:36:46 +0900 Subject: [PATCH 4/7] rename flow --- apps/11_promptflow/README.md | 8 ++++---- .../{playground => playground_chat}/.gitignore | 0 .../.promptflow/flow.tools.json | 0 .../{playground => playground_chat}/README.md | 0 .../{playground => playground_chat}/azure_openai.yaml | 0 .../{playground => playground_chat}/chat.jinja2 | 0 .../{playground => playground_chat}/data.jsonl | 0 .../{playground => playground_chat}/flow.dag.yaml | 0 .../{playground => playground_chat}/requirements.txt | 0 9 files changed, 4 insertions(+), 4 deletions(-) rename apps/11_promptflow/{playground => playground_chat}/.gitignore (100%) rename apps/11_promptflow/{playground => playground_chat}/.promptflow/flow.tools.json (100%) rename apps/11_promptflow/{playground => playground_chat}/README.md (100%) rename apps/11_promptflow/{playground => playground_chat}/azure_openai.yaml (100%) rename apps/11_promptflow/{playground => playground_chat}/chat.jinja2 (100%) rename apps/11_promptflow/{playground => playground_chat}/data.jsonl (100%) rename apps/11_promptflow/{playground => playground_chat}/flow.dag.yaml (100%) rename apps/11_promptflow/{playground => playground_chat}/requirements.txt (100%) diff --git a/apps/11_promptflow/README.md b/apps/11_promptflow/README.md index d73ba53..6a71bc9 100644 --- a/apps/11_promptflow/README.md +++ b/apps/11_promptflow/README.md @@ -66,17 +66,17 @@ $ pf run create \ --stream ``` -### playground +### playground_chat ```shell cd apps/11_promptflow # Initialize a new flow $ pf flow init \ - --flow playground \ + --flow playground_chat \ --type chat -$ cd playground +$ cd playground_chat # Set parameters $ CONNECTION_NAME=open_ai_connection @@ -113,7 +113,7 @@ $ pf flow test \ --inputs question="What's the capital of France?" # Create run with multiple lines data -$ RUN_NAME=playground-$(date +%s) +$ RUN_NAME=playground_chat-$(date +%s) $ pf run create \ --name $RUN_NAME \ --flow . \ diff --git a/apps/11_promptflow/playground/.gitignore b/apps/11_promptflow/playground_chat/.gitignore similarity index 100% rename from apps/11_promptflow/playground/.gitignore rename to apps/11_promptflow/playground_chat/.gitignore diff --git a/apps/11_promptflow/playground/.promptflow/flow.tools.json b/apps/11_promptflow/playground_chat/.promptflow/flow.tools.json similarity index 100% rename from apps/11_promptflow/playground/.promptflow/flow.tools.json rename to apps/11_promptflow/playground_chat/.promptflow/flow.tools.json diff --git a/apps/11_promptflow/playground/README.md b/apps/11_promptflow/playground_chat/README.md similarity index 100% rename from apps/11_promptflow/playground/README.md rename to apps/11_promptflow/playground_chat/README.md diff --git a/apps/11_promptflow/playground/azure_openai.yaml b/apps/11_promptflow/playground_chat/azure_openai.yaml similarity index 100% rename from apps/11_promptflow/playground/azure_openai.yaml rename to apps/11_promptflow/playground_chat/azure_openai.yaml diff --git a/apps/11_promptflow/playground/chat.jinja2 b/apps/11_promptflow/playground_chat/chat.jinja2 similarity index 100% rename from apps/11_promptflow/playground/chat.jinja2 rename to apps/11_promptflow/playground_chat/chat.jinja2 diff --git a/apps/11_promptflow/playground/data.jsonl b/apps/11_promptflow/playground_chat/data.jsonl similarity index 100% rename from apps/11_promptflow/playground/data.jsonl rename to apps/11_promptflow/playground_chat/data.jsonl diff --git a/apps/11_promptflow/playground/flow.dag.yaml b/apps/11_promptflow/playground_chat/flow.dag.yaml similarity index 100% rename from apps/11_promptflow/playground/flow.dag.yaml rename to apps/11_promptflow/playground_chat/flow.dag.yaml diff --git a/apps/11_promptflow/playground/requirements.txt b/apps/11_promptflow/playground_chat/requirements.txt similarity index 100% rename from apps/11_promptflow/playground/requirements.txt rename to apps/11_promptflow/playground_chat/requirements.txt From a83ee8001223a91059cd78086e88f0e0f142568a Mon Sep 17 00:00:00 2001 From: ks6088ts Date: Fri, 30 Aug 2024 14:51:45 +0900 Subject: [PATCH 5/7] pf flow init --flow playground_evaluation --type evaluation --- .../playground_evaluation/.gitignore | 5 +++ .../.promptflow/flow.tools.json | 36 +++++++++++++++++++ .../playground_evaluation/aggregate.py | 24 +++++++++++++ .../playground_evaluation/data.jsonl | 1 + .../playground_evaluation/flow.dag.yaml | 29 +++++++++++++++ .../playground_evaluation/line_process.py | 20 +++++++++++ .../playground_evaluation/requirements.txt | 1 + 7 files changed, 116 insertions(+) create mode 100644 apps/11_promptflow/playground_evaluation/.gitignore create mode 100644 apps/11_promptflow/playground_evaluation/.promptflow/flow.tools.json create mode 100644 apps/11_promptflow/playground_evaluation/aggregate.py create mode 100644 apps/11_promptflow/playground_evaluation/data.jsonl create mode 100644 apps/11_promptflow/playground_evaluation/flow.dag.yaml create mode 100644 apps/11_promptflow/playground_evaluation/line_process.py create mode 100644 apps/11_promptflow/playground_evaluation/requirements.txt diff --git a/apps/11_promptflow/playground_evaluation/.gitignore b/apps/11_promptflow/playground_evaluation/.gitignore new file mode 100644 index 0000000..61bd725 --- /dev/null +++ b/apps/11_promptflow/playground_evaluation/.gitignore @@ -0,0 +1,5 @@ +.env +__pycache__/ +.promptflow/* +!.promptflow/flow.tools.json +.runs/ diff --git a/apps/11_promptflow/playground_evaluation/.promptflow/flow.tools.json b/apps/11_promptflow/playground_evaluation/.promptflow/flow.tools.json new file mode 100644 index 0000000..8a744cb --- /dev/null +++ b/apps/11_promptflow/playground_evaluation/.promptflow/flow.tools.json @@ -0,0 +1,36 @@ +{ + "package": {}, + "code": { + "line_process.py": { + "type": "python", + "inputs": { + "groundtruth": { + "type": [ + "string" + ] + }, + "prediction": { + "type": [ + "string" + ] + } + }, + "description": "This tool processes the prediction of a single line and returns the processed result.\n\n:param groundtruth: the groundtruth of a single line.\n:param prediction: the prediction of a single line.", + "source": "line_process.py", + "function": "line_process" + }, + "aggregate.py": { + "type": "python", + "inputs": { + "processed_results": { + "type": [ + "object" + ] + } + }, + "description": "This tool aggregates the processed result of all lines and calculate the accuracy. Then log metric for the accuracy.\n\n:param processed_results: List of the output of line_process node.", + "source": "aggregate.py", + "function": "aggregate" + } + } +} diff --git a/apps/11_promptflow/playground_evaluation/aggregate.py b/apps/11_promptflow/playground_evaluation/aggregate.py new file mode 100644 index 0000000..608bb1e --- /dev/null +++ b/apps/11_promptflow/playground_evaluation/aggregate.py @@ -0,0 +1,24 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + + +from promptflow.core import log_metric, tool + + +@tool +def aggregate(processed_results: list[str]): + """ + This tool aggregates the processed result of all lines and calculate the accuracy. Then log metric for the accuracy. + + :param processed_results: List of the output of line_process node. + """ + + # Add your aggregation logic here + # Aggregate the results of all lines and calculate the accuracy + aggregated_result = round((processed_results.count("Correct") / len(processed_results)), 2) + + # Log metric the aggregate result + log_metric(key="accuracy", value=aggregated_result) + + return aggregated_result diff --git a/apps/11_promptflow/playground_evaluation/data.jsonl b/apps/11_promptflow/playground_evaluation/data.jsonl new file mode 100644 index 0000000..74dc24b --- /dev/null +++ b/apps/11_promptflow/playground_evaluation/data.jsonl @@ -0,0 +1 @@ +{"groundtruth": "App", "prediction": "App"} diff --git a/apps/11_promptflow/playground_evaluation/flow.dag.yaml b/apps/11_promptflow/playground_evaluation/flow.dag.yaml new file mode 100644 index 0000000..68d01ed --- /dev/null +++ b/apps/11_promptflow/playground_evaluation/flow.dag.yaml @@ -0,0 +1,29 @@ +$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json +inputs: + groundtruth: + type: string + prediction: + type: string +outputs: + results: + type: string + reference: ${line_process.output} +nodes: +- name: line_process + type: python + source: + type: code + path: line_process.py + inputs: + groundtruth: ${inputs.groundtruth} + prediction: ${inputs.prediction} +- name: aggregate + type: python + source: + type: code + path: aggregate.py + inputs: + processed_results: ${line_process.output} + aggregation: true +environment: + python_requirements_txt: requirements.txt diff --git a/apps/11_promptflow/playground_evaluation/line_process.py b/apps/11_promptflow/playground_evaluation/line_process.py new file mode 100644 index 0000000..39404bc --- /dev/null +++ b/apps/11_promptflow/playground_evaluation/line_process.py @@ -0,0 +1,20 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +from promptflow.core import tool + + +@tool +def line_process(groundtruth: str, prediction: str): + """ + This tool processes the prediction of a single line and returns the processed result. + + :param groundtruth: the groundtruth of a single line. + :param prediction: the prediction of a single line. + """ + + # Add your line processing logic here + processed_result = "Correct" if groundtruth.lower() == prediction.lower() else "Incorrect" + + return processed_result diff --git a/apps/11_promptflow/playground_evaluation/requirements.txt b/apps/11_promptflow/playground_evaluation/requirements.txt new file mode 100644 index 0000000..7a54870 --- /dev/null +++ b/apps/11_promptflow/playground_evaluation/requirements.txt @@ -0,0 +1 @@ +promptflow From 892ae10c095f3d4f1ebac1546f85e2f169e411b5 Mon Sep 17 00:00:00 2001 From: ks6088ts Date: Fri, 30 Aug 2024 14:52:27 +0900 Subject: [PATCH 6/7] addd procedures for evaluation --- apps/11_promptflow/README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/apps/11_promptflow/README.md b/apps/11_promptflow/README.md index 6a71bc9..6bab5f8 100644 --- a/apps/11_promptflow/README.md +++ b/apps/11_promptflow/README.md @@ -125,6 +125,33 @@ $ pf run create \ $ pf run show-details --name $RUN_NAME ``` +### playground_evaluation + +```shell +cd apps/11_promptflow + +# Initialize a new flow +$ pf flow init \ + --flow playground_evaluation \ + --type evaluation + +$ cd playground_evaluation + +# Create run with multiple lines data +$ RUN_NAME=playground_evaluation-$(date +%s) +$ pf run create \ + --name $RUN_NAME \ + --flow . \ + --data ./data.jsonl \ + --column-mapping \ + groundtruth='${data.groundtruth}' \ + prediction='${data.prediction}' \ + --stream + +# Show run details +$ pf run show-details --name $RUN_NAME +``` + ## References - [Prompt flow > repos](https://github.com/microsoft/promptflow) From 4b7550f0dc2416bff32454c67285153a45de990c Mon Sep 17 00:00:00 2001 From: ks6088ts Date: Fri, 30 Aug 2024 14:57:40 +0900 Subject: [PATCH 7/7] add standard flow --- apps/11_promptflow/README.md | 25 ++++++++++++++++ .../playground_standard/.gitignore | 5 ++++ .../.promptflow/flow.tools.json | 29 +++++++++++++++++++ .../playground_standard/data.jsonl | 1 + .../playground_standard/flow.dag.yaml | 25 ++++++++++++++++ .../playground_standard/hello.jinja2 | 2 ++ .../playground_standard/hello.py | 14 +++++++++ .../playground_standard/requirements.txt | 1 + 8 files changed, 102 insertions(+) create mode 100644 apps/11_promptflow/playground_standard/.gitignore create mode 100644 apps/11_promptflow/playground_standard/.promptflow/flow.tools.json create mode 100644 apps/11_promptflow/playground_standard/data.jsonl create mode 100644 apps/11_promptflow/playground_standard/flow.dag.yaml create mode 100644 apps/11_promptflow/playground_standard/hello.jinja2 create mode 100644 apps/11_promptflow/playground_standard/hello.py create mode 100644 apps/11_promptflow/playground_standard/requirements.txt diff --git a/apps/11_promptflow/README.md b/apps/11_promptflow/README.md index 6bab5f8..9fc7ccb 100644 --- a/apps/11_promptflow/README.md +++ b/apps/11_promptflow/README.md @@ -152,6 +152,31 @@ $ pf run create \ $ pf run show-details --name $RUN_NAME ``` +### playground_standard + +```shell +cd apps/11_promptflow + +# Initialize a new flow +$ pf flow init \ + --flow playground_standard \ + --type standard + +$ cd playground_standard + +# Create run with multiple lines data +$ RUN_NAME=playground_standard-$(date +%s) +$ pf run create \ + --name $RUN_NAME \ + --flow . \ + --data ./data.jsonl \ + --column-mapping text='${data.text}' \ + --stream + +# Show run details +$ pf run show-details --name $RUN_NAME +``` + ## References - [Prompt flow > repos](https://github.com/microsoft/promptflow) diff --git a/apps/11_promptflow/playground_standard/.gitignore b/apps/11_promptflow/playground_standard/.gitignore new file mode 100644 index 0000000..61bd725 --- /dev/null +++ b/apps/11_promptflow/playground_standard/.gitignore @@ -0,0 +1,5 @@ +.env +__pycache__/ +.promptflow/* +!.promptflow/flow.tools.json +.runs/ diff --git a/apps/11_promptflow/playground_standard/.promptflow/flow.tools.json b/apps/11_promptflow/playground_standard/.promptflow/flow.tools.json new file mode 100644 index 0000000..c654d99 --- /dev/null +++ b/apps/11_promptflow/playground_standard/.promptflow/flow.tools.json @@ -0,0 +1,29 @@ +{ + "package": {}, + "code": { + "hello.jinja2": { + "type": "prompt", + "inputs": { + "text": { + "type": [ + "string" + ] + } + }, + "description": "Please replace the template with your own prompt.", + "source": "hello.jinja2" + }, + "hello.py": { + "type": "python", + "inputs": { + "input1": { + "type": [ + "string" + ] + } + }, + "source": "hello.py", + "function": "my_python_tool" + } + } +} diff --git a/apps/11_promptflow/playground_standard/data.jsonl b/apps/11_promptflow/playground_standard/data.jsonl new file mode 100644 index 0000000..15e3aa5 --- /dev/null +++ b/apps/11_promptflow/playground_standard/data.jsonl @@ -0,0 +1 @@ +{"text": "Hello World!"} diff --git a/apps/11_promptflow/playground_standard/flow.dag.yaml b/apps/11_promptflow/playground_standard/flow.dag.yaml new file mode 100644 index 0000000..1415bf3 --- /dev/null +++ b/apps/11_promptflow/playground_standard/flow.dag.yaml @@ -0,0 +1,25 @@ +$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json +inputs: + text: + type: string +outputs: + output_prompt: + type: string + reference: ${echo_my_prompt.output} +nodes: +- name: hello_prompt + type: prompt + source: + type: code + path: hello.jinja2 + inputs: + text: ${inputs.text} +- name: echo_my_prompt + type: python + source: + type: code + path: hello.py + inputs: + input1: ${hello_prompt.output} +environment: + python_requirements_txt: requirements.txt diff --git a/apps/11_promptflow/playground_standard/hello.jinja2 b/apps/11_promptflow/playground_standard/hello.jinja2 new file mode 100644 index 0000000..d2519cb --- /dev/null +++ b/apps/11_promptflow/playground_standard/hello.jinja2 @@ -0,0 +1,2 @@ +{# Please replace the template with your own prompt. #} +Write a simple {{text}} program that displays the greeting message. diff --git a/apps/11_promptflow/playground_standard/hello.py b/apps/11_promptflow/playground_standard/hello.py new file mode 100644 index 0000000..f533b27 --- /dev/null +++ b/apps/11_promptflow/playground_standard/hello.py @@ -0,0 +1,14 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +from promptflow.core import tool + +# The inputs section will change based on the arguments of the tool function, after you save the code +# Adding type to arguments and return value will help the system show the types properly +# Please update the function name/signature per need + + +@tool +def my_python_tool(input1: str) -> str: + return "Prompt: " + input1 diff --git a/apps/11_promptflow/playground_standard/requirements.txt b/apps/11_promptflow/playground_standard/requirements.txt new file mode 100644 index 0000000..7a54870 --- /dev/null +++ b/apps/11_promptflow/playground_standard/requirements.txt @@ -0,0 +1 @@ +promptflow