diff --git a/.github/workflows/run-eval-pf-pipeline.yml b/.github/workflows/run-eval-pf-pipeline.yml new file mode 100644 index 0000000..128526c --- /dev/null +++ b/.github/workflows/run-eval-pf-pipeline.yml @@ -0,0 +1,93 @@ +name: Test and Evaulate Prompts with Promptflow + +on: + workflow_dispatch: + push: + branches: [ main ] + +env: + GROUP: ${{secrets.GROUP}} + WORKSPACE: ${{secrets.WORKSPACE}} + SUBSCRIPTION: ${{secrets.SUBSCRIPTION}} + RUN_NAME: web_classification_variant_1_20230816_215600_605116 + EVAL_RUN_NAME: classification_accuracy_eval_default_20230821_111809_077086 + +jobs: + login-and-run-and-evalpf: + runs-on: ubuntu-latest + steps: + - name: check out repo + uses: actions/checkout@v2 + - name: install az ml extension + run: az extension add -n ml -y + - name: azure login + uses: azure/login@v1 + with: + creds: ${{secrets.AZURE_CREDENTIALS}} + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.11.4' + - name: list current directory + run: ls + - name: install promptflow + run: pip install -r promptflow/web-classification/requirements.txt + - name: run promptflow + run: | + pfazure run create -f promptflow/web-classification/run.yml --subscription ${{env.SUBSCRIPTION}} -g ${{env.GROUP}} -w ${{env.WORKSPACE}} --stream > promptflow/llmops-helper/run_info.txt + cat promptflow/llmops-helper/run_info.txt + - name: set run name + run: | + echo "RUN_NAME=$(python promptflow/llmops-helper/parse_run_output.py run_info.txt)" >> "$GITHUB_ENV" + - name: show the current run name + run: echo "Run name is:" ${{env.RUN_NAME}} + - name: show promptflow results + run: pfazure run show-details --name ${{env.RUN_NAME}} --subscription ${{env.SUBSCRIPTION}} -g ${{env.GROUP}} -w ${{env.WORKSPACE}} + - name: run promptflow evaluations + run: pfazure run create -f promptflow/web-classification/run_evaluation.yml --run ${{env.RUN_NAME}} --subscription ${{env.SUBSCRIPTION}} -g ${{env.GROUP}} -w ${{env.WORKSPACE}} --stream > promptflow/llmops-helper/eval_info.txt + - name: get eval run name + run: export EVAL_RUN_NAME=$(python promptflow/llmops-helper/parse_run_output.py eval_info.txt) + - name: show promptflow details + run: pfazure run show-details --name ${{env.EVAL_RUN_NAME}} --subscription ${{env.SUBSCRIPTION}} -g ${{env.GROUP}} -w ${{env.WORKSPACE}} + - name: show promptflow metrics + run: pfazure run show-metrics --name ${{env.EVAL_RUN_NAME}} --subscription ${{env.SUBSCRIPTION}} -g ${{env.GROUP}} -w ${{env.WORKSPACE}} > promptflow/llmops-helper/eval_result.json + + assert-and-register-model: + needs: login-and-run-and-evalpf + runs-on: ubuntu-latest + steps: + - name: check out repo + uses: actions/checkout@v2 + - name: install az ml extension + run: az extension add -n ml -y + - name: azure login + uses: azure/login@v1 + with: + creds: ${{secrets.AZURE_CREDENTIALS}} + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.11.4' + - name: set default subscription + run: | + az account set -s ${{env.SUBSCRIPTION}} + - name: list current directory + run: ls + - name: install promptflow + run: pip install -r promptflow/web-classification/requirements.txt + - name: get assert eval results + id: jobMetricAssert + run: | + export ASSERT=$(python promptflow/llmops-helper/assert.py result.json 0.6) # NOTE .json is the file name and decimal is the threshold for the assertion + echo "::debug::Assert has returned the following value: $ASSERT" + # assert.py will return True or False, but bash expects lowercase. + if ${ASSERT,,} ; then + echo "::debug::Prompt flow run met the quality bar and can be deployed." + echo "::set-output name=result::true" + else + echo "::warning::Prompt flow run didn't meet quality bar." + echo "::set-output name=result::false" + fi + - name: register promptflow model + if: ${{ steps.jobMetricAssert.outputs.result == 'true' }} + run: az ml model create --file promptflow/deployment/model.yaml -g ${{env.GROUP}} -w ${{env.WORKSPACE}} \ No newline at end of file diff --git a/README.md b/README.md index 5cd7cec..671513f 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,6 @@ # Project -> This repo has been populated by an initial template to help get you started. Please -> make sure to update the content to build a great experience for community-building. - -As the maintainer of this project, please make a few updates: - -- Improving this README.MD file to provide a great experience -- Updating SUPPORT.MD with content about this project's support experience -- Understanding the security reporting process in SECURITY.MD -- Remove this section from the README +Read more about how to get started with [LLMOps on Microsoft Offical Docs](https://aka.ms/llmops_getting-started) ## Contributing diff --git a/promptflow/deployment/deployment.yaml b/promptflow/deployment/deployment.yaml new file mode 100644 index 0000000..3afdbc7 --- /dev/null +++ b/promptflow/deployment/deployment.yaml @@ -0,0 +1,33 @@ +$schema: https://azuremlschemas.azureedge.net/latest/managedOnlineDeployment.schema.json +name: blue +endpoint_name: web-classification-7272ff +model: azureml:web-classification-model:1 + # You can also specify model files path inline + # path: examples/flows/chat/basic-chat +environment: + image: mcr.microsoft.com/azureml/promptflow/promptflow-runtime:20230808.v1 + # inference config is used to build a serving container for online deployments + inference_config: + liveness_route: + path: /health + port: 8080 + readiness_route: + path: /health + port: 8080 + scoring_route: + path: /score + port: 8080 +instance_type: Standard_E16s_v3 +instance_count: 1 +environment_variables: + + # "compute" mode is the default mode, if you want to deploy to serving mode, you need to set this env variable to "serving" + PROMPTFLOW_RUN_MODE: serving + + # for pulling connections from workspace + PRT_CONFIG_OVERRIDE: deployment.subscription_id=,deployment.resource_group=o,deployment.workspace_name=,deployment.endpoint_name=,deployment.deployment_name= + + # (Optional) When there are multiple fields in the response, using this env variable will filter the fields to expose in the response. + # For example, if there are 2 flow outputs: "answer", "context", and I only want to have "answer" in the endpoint response, I can set this env variable to '["answer"]'. + # If you don't set this environment, by default all flow outputs will be included in the endpoint response. + # PROMPTFLOW_RESPONSE_INCLUDED_FIELDS: '["category", "evidence"]' \ No newline at end of file diff --git a/promptflow/deployment/endpoint.yaml b/promptflow/deployment/endpoint.yaml new file mode 100644 index 0000000..42cdbf5 --- /dev/null +++ b/promptflow/deployment/endpoint.yaml @@ -0,0 +1,3 @@ +$schema: https://azuremlschemas.azureedge.net/latest/managedOnlineEndpoint.schema.json +name: web-classification-endpoint +auth_mode: key \ No newline at end of file diff --git a/promptflow/deployment/model.yaml b/promptflow/deployment/model.yaml new file mode 100644 index 0000000..c234f84 --- /dev/null +++ b/promptflow/deployment/model.yaml @@ -0,0 +1,12 @@ +$schema: https://azuremlschemas.azureedge.net/latest/model.schema.json +name: web-classification-model +path: ../web-classification +stage: Production +description: register web-classification flow folder as a custom model +properties: + # In AuzreML studio UI, endpoint detail UI Test tab needs this property to know it's from prompt flow + azureml.promptflow.source_flow_id: web-classification + + # Following are properties only for classification flow + # endpoint detail UI Test tab needs this property to know it's a classification flow + azureml.promptflow.mode: classification \ No newline at end of file diff --git a/promptflow/deployment/sample-request.json b/promptflow/deployment/sample-request.json new file mode 100644 index 0000000..0c4ff0c --- /dev/null +++ b/promptflow/deployment/sample-request.json @@ -0,0 +1,3 @@ +{ + "url": "https://www.microsoft.com/en-us/store/collections/xboxseriessconsoles?icid=CNav_Xbox_Series_S" +} \ No newline at end of file diff --git a/promptflow/evaluation/basic-eval/README.md b/promptflow/evaluation/basic-eval/README.md new file mode 100644 index 0000000..cef4691 --- /dev/null +++ b/promptflow/evaluation/basic-eval/README.md @@ -0,0 +1,40 @@ +# Basic Eval +This example shows how to create a basic evaluation flow. + +Tools used in this flow: +- `python` tool + +## Prerequisites + +Install promptflow sdk and other dependencies in this folder: +```bash +pip install -r requirements.txt +``` + +## What you will learn + +In this flow, you will learn +- how to compose a point based evaluation flow, where you can calculate point-wise metrics. +- the way to log metrics. use `from promptflow import log_metric` + - see file [aggregate](aggregate.py). TODO. + +### 1. Test flow with single line data + +Testing flow/node: +```bash +# test with default input value in flow.dag.yaml +pf flow test --flow . + +# test with flow inputs +pf flow test --flow . --inputs groundtruth=ABC prediction=ABC + +# test node with inputs +pf flow test --flow . --node line_process --inputs groundtruth=ABC prediction=ABC +``` + +### 2. create flow run with multi line data +There are two ways to evaluate an classification flow. + +```bash +pf run create --flow . --data ./data.jsonl --stream +``` \ No newline at end of file diff --git a/promptflow/evaluation/basic-eval/aggregate.py b/promptflow/evaluation/basic-eval/aggregate.py new file mode 100644 index 0000000..098a6bd --- /dev/null +++ b/promptflow/evaluation/basic-eval/aggregate.py @@ -0,0 +1,24 @@ +from typing import List + +from promptflow import tool + + +@tool +def aggregate(processed_results: List[str]): + """ + This tool aggregates the processed result of all lines to the variant level and log metric for each variant. + + :param processed_results: List of the output of line_process node. + """ + + # Add your aggregation logic here + # aggregated_results should be a dictionary with the metric name as the key and the metric value as the value. + results_num = len(processed_results) + print(results_num) + print(processed_results) + + # Log metric for each variant + from promptflow import log_metric + log_metric(key="results_num", value=results_num) + + return results_num diff --git a/promptflow/evaluation/basic-eval/data.jsonl b/promptflow/evaluation/basic-eval/data.jsonl new file mode 100644 index 0000000..f35cd97 --- /dev/null +++ b/promptflow/evaluation/basic-eval/data.jsonl @@ -0,0 +1 @@ +{"groundtruth": "Tomorrow's weather will be sunny.","prediction": "The weather will be sunny tomorrow."} diff --git a/promptflow/evaluation/basic-eval/flow.dag.yaml b/promptflow/evaluation/basic-eval/flow.dag.yaml new file mode 100644 index 0000000..94c4792 --- /dev/null +++ b/promptflow/evaluation/basic-eval/flow.dag.yaml @@ -0,0 +1,28 @@ +inputs: + groundtruth: + type: string + default: groundtruth + prediction: + type: string + default: prediction +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 diff --git a/promptflow/evaluation/basic-eval/line_process.py b/promptflow/evaluation/basic-eval/line_process.py new file mode 100644 index 0000000..e61befd --- /dev/null +++ b/promptflow/evaluation/basic-eval/line_process.py @@ -0,0 +1,14 @@ +from promptflow 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 + return "Correct" if groundtruth.lower() == prediction.lower() else "Incorrect" diff --git a/promptflow/evaluation/basic-eval/requirements.txt b/promptflow/evaluation/basic-eval/requirements.txt new file mode 100644 index 0000000..923651d --- /dev/null +++ b/promptflow/evaluation/basic-eval/requirements.txt @@ -0,0 +1,5 @@ +--extra-index-url https://azuremlsdktestpypi.azureedge.net/promptflow/ +promptflow +promptflow-tools +langchain +jinja2 \ No newline at end of file diff --git a/promptflow/evaluation/classification-accuracy-eval/.promptflow/flow.tools.json b/promptflow/evaluation/classification-accuracy-eval/.promptflow/flow.tools.json new file mode 100644 index 0000000..8906f76 --- /dev/null +++ b/promptflow/evaluation/classification-accuracy-eval/.promptflow/flow.tools.json @@ -0,0 +1,36 @@ +{ + "package": {}, + "code": { + "grade.py": { + "name": "grade.py", + "type": "python", + "inputs": { + "groundtruth": { + "type": [ + "string" + ] + }, + "prediction": { + "type": [ + "string" + ] + } + }, + "source": "grade.py", + "function": "grade" + }, + "calculate_accuracy.py": { + "name": "calculate_accuracy.py", + "type": "python", + "inputs": { + "grades": { + "type": [ + "object" + ] + } + }, + "source": "calculate_accuracy.py", + "function": "calculate_accuracy" + } + } +} \ No newline at end of file diff --git a/promptflow/evaluation/classification-accuracy-eval/README.md b/promptflow/evaluation/classification-accuracy-eval/README.md new file mode 100644 index 0000000..eb05bc3 --- /dev/null +++ b/promptflow/evaluation/classification-accuracy-eval/README.md @@ -0,0 +1,38 @@ +# Classification Accuracy Evaluation + +This is a flow illustrating how to evaluate the performance of a classification system. It involves comparing each prediction to the groundtruth and assigns a "Correct" or "Incorrect" grade, and aggregating the results to produce metrics such as accuracy, which reflects how good the system is at classifying the data. + +Tools used in this flow: +- `python` tool + +## What you will learn + +In this flow, you will learn +- how to compose a point based evaluation flow, where you can calculate point-wise metrics. +- the way to log metrics. use `from promptflow import log_metric` + - see file [calculate_accuracy.py](calculate_accuracy.py) + +### 1. Test flow/node + +```bash +# test with default input value in flow.dag.yaml +pf flow test --flow . + +# test with flow inputs +pf flow test --flow . --inputs groundtruth=APP prediction=APP + +# test node with inputs +pf flow test --flow . --node grade --inputs groundtruth=groundtruth prediction=prediction +``` + +### 2. create flow run with multi line data +There are two ways to evaluate an classification flow. + +```bash +pf run create --flow . --data ./data.jsonl --stream +``` + +### 3. create run against other flow run + +Learn more in [web-classification](../../standard/web-classification/README.md) + diff --git a/promptflow/evaluation/classification-accuracy-eval/__pycache__/calculate_accuracy.cpython-311.pyc b/promptflow/evaluation/classification-accuracy-eval/__pycache__/calculate_accuracy.cpython-311.pyc new file mode 100644 index 0000000..892d3ac Binary files /dev/null and b/promptflow/evaluation/classification-accuracy-eval/__pycache__/calculate_accuracy.cpython-311.pyc differ diff --git a/promptflow/evaluation/classification-accuracy-eval/__pycache__/grade.cpython-311.pyc b/promptflow/evaluation/classification-accuracy-eval/__pycache__/grade.cpython-311.pyc new file mode 100644 index 0000000..d0396f1 Binary files /dev/null and b/promptflow/evaluation/classification-accuracy-eval/__pycache__/grade.cpython-311.pyc differ diff --git a/promptflow/evaluation/classification-accuracy-eval/calculate_accuracy.py b/promptflow/evaluation/classification-accuracy-eval/calculate_accuracy.py new file mode 100644 index 0000000..35fbc75 --- /dev/null +++ b/promptflow/evaluation/classification-accuracy-eval/calculate_accuracy.py @@ -0,0 +1,17 @@ +from typing import List + +from promptflow import log_metric, tool + + +@tool +def calculate_accuracy(grades: List[str]): + result = [] + for index in range(len(grades)): + grade = grades[index] + result.append(grade) + + # calculate accuracy for each variant + accuracy = round((result.count("Correct") / len(result)), 2) + log_metric("accuracy", accuracy) + + return result diff --git a/promptflow/evaluation/classification-accuracy-eval/data.jsonl b/promptflow/evaluation/classification-accuracy-eval/data.jsonl new file mode 100644 index 0000000..b283b3b --- /dev/null +++ b/promptflow/evaluation/classification-accuracy-eval/data.jsonl @@ -0,0 +1,3 @@ +{"groundtruth": "App","prediction": "App"} +{"groundtruth": "Channel","prediction": "Channel"} +{"groundtruth": "Academic","prediction": "Academic"} diff --git a/promptflow/evaluation/classification-accuracy-eval/flow.dag.yaml b/promptflow/evaluation/classification-accuracy-eval/flow.dag.yaml new file mode 100644 index 0000000..9aae029 --- /dev/null +++ b/promptflow/evaluation/classification-accuracy-eval/flow.dag.yaml @@ -0,0 +1,32 @@ +inputs: + groundtruth: + type: string + description: Please specify the groundtruth column, which contains the true label + to the outputs that your flow produces. + default: APP + prediction: + type: string + description: Please specify the prediction column, which contains the predicted + outputs that your flow produces. + default: APP +outputs: + grade: + type: string + reference: ${grade.output} +nodes: +- name: grade + type: python + source: + type: code + path: grade.py + inputs: + groundtruth: ${inputs.groundtruth} + prediction: ${inputs.prediction} +- name: calculate_accuracy + type: python + source: + type: code + path: calculate_accuracy.py + inputs: + grades: ${grade.output} + aggregation: true diff --git a/promptflow/evaluation/classification-accuracy-eval/grade.py b/promptflow/evaluation/classification-accuracy-eval/grade.py new file mode 100644 index 0000000..96a1106 --- /dev/null +++ b/promptflow/evaluation/classification-accuracy-eval/grade.py @@ -0,0 +1,6 @@ +from promptflow import tool + + +@tool +def grade(groundtruth: str, prediction: str): + return "Correct" if groundtruth.lower() == prediction.lower() else "Incorrect" diff --git a/promptflow/evaluation/classification-accuracy-eval/requirements.txt b/promptflow/evaluation/classification-accuracy-eval/requirements.txt new file mode 100644 index 0000000..923651d --- /dev/null +++ b/promptflow/evaluation/classification-accuracy-eval/requirements.txt @@ -0,0 +1,5 @@ +--extra-index-url https://azuremlsdktestpypi.azureedge.net/promptflow/ +promptflow +promptflow-tools +langchain +jinja2 \ No newline at end of file diff --git a/promptflow/llmops-helper/assert.py b/promptflow/llmops-helper/assert.py new file mode 100644 index 0000000..dcac431 --- /dev/null +++ b/promptflow/llmops-helper/assert.py @@ -0,0 +1,27 @@ +import os +import sys +import json + +""" This script is used to assert that the metric value in the file at file_path is greater than or equal to the expected value. + + Usage: python assert.py +""" +def assert_metric(file_path:str, expected_value: str) -> bool: + result = json.load(open(file_path)) + metric_value = result['accuracy'] + + return float(metric_value) >= float(expected_value) + +def main(): + cwd = os.getcwd() + path = os.path.join(cwd,'promptflow/llmops-helper',sys.argv[1]) + expected_value = sys.argv[2] + + pass_bool = assert_metric(path, expected_value) + + return pass_bool + +if __name__ == "__main__": + result = main() + print(bool(result)) + diff --git a/promptflow/llmops-helper/parse_run_output.py b/promptflow/llmops-helper/parse_run_output.py new file mode 100644 index 0000000..24e0958 --- /dev/null +++ b/promptflow/llmops-helper/parse_run_output.py @@ -0,0 +1,19 @@ +import os +import sys + +def main(): + cwd = os.getcwd() + path = os.path.join(cwd,'promptflow/llmops-helper',sys.argv[1]) + with open(path, 'r') as f: + output = f.read() + + start = output.find('"name": "') + len('"name": "') + end = output.find('"', start) + + name = output[start:end] + return name + +if __name__ == "__main__": + run_name = main() + print(run_name) + \ No newline at end of file diff --git a/promptflow/llmops-helper/result.json b/promptflow/llmops-helper/result.json new file mode 100644 index 0000000..efed2ad --- /dev/null +++ b/promptflow/llmops-helper/result.json @@ -0,0 +1,3 @@ +{ + "accuracy": 0.67 +} diff --git a/promptflow/llmops-helper/run_info.txt b/promptflow/llmops-helper/run_info.txt new file mode 100644 index 0000000..30a4387 --- /dev/null +++ b/promptflow/llmops-helper/run_info.txt @@ -0,0 +1,35 @@ + + +{ + "name": "web_classification_variant_1_20230818_181747_923527", + "created_on": "2023-08-19T01:18:07.903358+00:00", + "status": "Running", + "display_name": "web_classification_variant_1_20230818_181747_923527", + "description": null, + "tags": {}, + "properties": { + "azureml.promptflow.runtime_name": "abe", + "azureml.promptflow.runtime_version": "20230808.v1", + "azureml.promptflow.definition_file_name": "flow.dag.yaml", + "azureml.promptflow.node_variant": "${summarize_text_content.variant_1}", + "azureml.promptflow.snapshot_id": "29fbc757-dd75-46bc-9da2-92ff36ffdba7" + }, + "creation_context": { + "userObjectId": "8ced1439-1469-4cde-880d-132a4c220f51", + "userPuId": "100320006A776D38", + "userIdp": null, + "userAltSecId": null, + "userIss": "https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/", + "userTenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userName": "Abe Omorogbe", + "upn": null + }, + "start_time": "2023-08-19T01:18:10.026517+00:00", + "end_time": null, + "duration": null, + "portal_url": "https://ml.azure.com/prompts/flow/bulkrun/run/web_classification_variant_1_20230818_181747_923527/details?wsid=/subscriptions/ea4faa5b-5e44-4236-91f6-5483d5b17d14/resourceGroups/osomorog/providers/Microsoft.MachineLearningServices/workspaces/abes-policy-testing&flight=promptfilestorage,PFSourceRun=false", + "data": "azureml://datastores/workspaceblobstore/paths/LocalUpload/70c38e61b28e21cb9ddcd67dbe209f05/data.jsonl", + "data_portal_url": "https://ml.azure.com/data/datastore/workspaceblobstore/edit?wsid=/subscriptions/ea4faa5b-5e44-4236-91f6-5483d5b17d14/resourceGroups/osomorog/providers/Microsoft.MachineLearningServices/workspaces/abes-policy-testing&activeFilePath=LocalUpload/70c38e61b28e21cb9ddcd67dbe209f05/data.jsonl#browseTab", + "output": null, + "output_portal_url": null +} diff --git a/promptflow/web-classification/.promptflow/flow.detail.json b/promptflow/web-classification/.promptflow/flow.detail.json new file mode 100644 index 0000000..2d76152 --- /dev/null +++ b/promptflow/web-classification/.promptflow/flow.detail.json @@ -0,0 +1,762 @@ +{ + "flow_runs": [ + { + "run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283_0", + "status": "Completed", + "error": null, + "inputs": { + "url": "https://play.google.com/store/apps/details?id=com.twitter.android" + }, + "output": { + "category": "App", + "evidence": "Both" + }, + "metrics": null, + "request": null, + "parent_run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283", + "root_run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283", + "source_run_id": null, + "flow_id": "default_flow_id", + "start_time": "2023-08-16T01:28:15.424182Z", + "end_time": "2023-08-16T01:28:33.094230Z", + "index": 0, + "api_calls": [ + { + "name": "fetch_text_content_from_url", + "type": "Tool", + "inputs": { + "url": "https://play.google.com/store/apps/details?id=com.twitter.android" + }, + "output": "X - Apps on Google Playgoogle_logo PlayGamesAppsMovies & TVBooksKidsnonesearchhelp_outline Sign in with Googleplay_appsLibrary & devicespaymentPayments & subscriptionsreviewsMy Play activityredeemOffersPlay PasssettingsSettingsPrivacy Policy \u2022 Terms of ServiceGamesAppsMovies & TVBooksKidsXX Corp.Contains adsIn-app purchases3.9star21.3M reviews1B+DownloadsMature 17+infoInstallShareAdd to wishlistAbout this apparrow_forwardThe X app is the trusted global digital town square for everyone.With X, you can:- Post content for the world to see and join public conversations- Stay up to date on breaking news and follow your interests- Stay better informed with extra context from Community Notes- Go live with Spaces for audio or stream live video- Communicate privately with Direct Messages- Subscribe to X Premium to expand your reach, get a blue checkmark, and more- Earn a living creating exclusive content for your paid subscribers and share in the ad revenue generated in replies to your posts- Create and join Communities around topics and interests, from sports to music to technology- Upload and watch videos up to 3 hours in length- Write and read long form posts like essays and blogs- Connect directly with your customers to help your business growUpdated onAug 8, 2023#4 top free socialSocialData safetyarrow_forwardSafety starts with understanding how developers collect and share your data. Data privacy and security practices may vary based on your use, region, and age. The developer provided this information and may update it over time.No data shared with third partiesLearn more about how developers declare sharingThis app may collect these data typesLocation, Personal info and 9 othersData is encrypted in transitYou can request that data be deletedSee detailsRatings and reviewsRatings and reviews are verifiedinfo_outlinearrow_forwardRatings and reviews are verifiedinfo_outlinephone_androidPhonetablet_androidTabletwatchWatchlaptopChromebooktvTV3.920.5M reviews54321J Dmore_ve", + "start_time": 1692174495.428718, + "end_time": 1692174501.405176, + "error": null, + "children": null, + "node_name": "fetch_text_content_from_url" + }, + { + "name": "AzureOpenAI.chat", + "type": "Tool", + "inputs": { + "prompt": "system:\nPlease summarize the following text in one paragraph. 100 words.\nDo not add any information that is not in the text.\n\nuser:\nText: {{text}}\nSummary: ", + "deployment_name": "gpt-35-turbo-0301", + "max_tokens": 128, + "temperature": 0.2, + "text": "X - Apps on Google Playgoogle_logo PlayGamesAppsMovies & TVBooksKidsnonesearchhelp_outline Sign in with Googleplay_appsLibrary & devicespaymentPayments & subscriptionsreviewsMy Play activityredeemOffersPlay PasssettingsSettingsPrivacy Policy \u2022 Terms of ServiceGamesAppsMovies & TVBooksKidsXX Corp.Contains adsIn-app purchases3.9star21.3M reviews1B+DownloadsMature 17+infoInstallShareAdd to wishlistAbout this apparrow_forwardThe X app is the trusted global digital town square for everyone.With X, you can:- Post content for the world to see and join public conversations- Stay up to date on breaking news and follow your interests- Stay better informed with extra context from Community Notes- Go live with Spaces for audio or stream live video- Communicate privately with Direct Messages- Subscribe to X Premium to expand your reach, get a blue checkmark, and more- Earn a living creating exclusive content for your paid subscribers and share in the ad revenue generated in replies to your posts- Create and join Communities around topics and interests, from sports to music to technology- Upload and watch videos up to 3 hours in length- Write and read long form posts like essays and blogs- Connect directly with your customers to help your business growUpdated onAug 8, 2023#4 top free socialSocialData safetyarrow_forwardSafety starts with understanding how developers collect and share your data. Data privacy and security practices may vary based on your use, region, and age. The developer provided this information and may update it over time.No data shared with third partiesLearn more about how developers declare sharingThis app may collect these data typesLocation, Personal info and 9 othersData is encrypted in transitYou can request that data be deletedSee detailsRatings and reviewsRatings and reviews are verifiedinfo_outlinearrow_forwardRatings and reviews are verifiedinfo_outlinephone_androidPhonetablet_androidTabletwatchWatchlaptopChromebooktvTV3.920.5M reviews54321J Dmore_ve" + }, + "output": "The X app is a social media platform that allows users to post content, follow breaking news, communicate privately, and create and join communities around various topics. It also offers a premium subscription service for users to expand their reach and earn money by creating exclusive content for paid subscribers. The app allows users to upload and watch videos up to 3 hours in length and write and read long-form posts. The app collects various types of data, including location and personal information, but data is encrypted in transit and not shared with third parties.", + "start_time": 1692174501.596812, + "end_time": 1692174510.370567, + "error": null, + "children": [ + { + "name": "openai.api_resources.chat_completion.ChatCompletion.create", + "type": "LLM", + "inputs": { + "api_base": "https://eastus.api.cognitive.microsoft.com/", + "api_type": "azure", + "api_version": "2023-03-15-preview", + "engine": "gpt-35-turbo-0301", + "messages": [ + { + "role": "system", + "content": "Please summarize the following text in one paragraph. 100 words.\nDo not add any information that is not in the text." + }, + { + "role": "user", + "content": "Text: X - Apps on Google Playgoogle_logo PlayGamesAppsMovies & TVBooksKidsnonesearchhelp_outline Sign in with Googleplay_appsLibrary & devicespaymentPayments & subscriptionsreviewsMy Play activityredeemOffersPlay PasssettingsSettingsPrivacy Policy \u2022 Terms of ServiceGamesAppsMovies & TVBooksKidsXX Corp.Contains adsIn-app purchases3.9star21.3M reviews1B+DownloadsMature 17+infoInstallShareAdd to wishlistAbout this apparrow_forwardThe X app is the trusted global digital town square for everyone.With X, you can:- Post content for the world to see and join public conversations- Stay up to date on breaking news and follow your interests- Stay better informed with extra context from Community Notes- Go live with Spaces for audio or stream live video- Communicate privately with Direct Messages- Subscribe to X Premium to expand your reach, get a blue checkmark, and more- Earn a living creating exclusive content for your paid subscribers and share in the ad revenue generated in replies to your posts- Create and join Communities around topics and interests, from sports to music to technology- Upload and watch videos up to 3 hours in length- Write and read long form posts like essays and blogs- Connect directly with your customers to help your business growUpdated onAug 8, 2023#4 top free socialSocialData safetyarrow_forwardSafety starts with understanding how developers collect and share your data. Data privacy and security practices may vary based on your use, region, and age. The developer provided this information and may update it over time.No data shared with third partiesLearn more about how developers declare sharingThis app may collect these data typesLocation, Personal info and 9 othersData is encrypted in transitYou can request that data be deletedSee detailsRatings and reviewsRatings and reviews are verifiedinfo_outlinearrow_forwardRatings and reviews are verifiedinfo_outlinephone_androidPhonetablet_androidTabletwatchWatchlaptopChromebooktvTV3.920.5M reviews54321J Dmore_ve\nSummary: " + } + ], + "temperature": 0.2, + "top_p": 1.0, + "n": 1, + "stream": false, + "stop": null, + "max_tokens": 128, + "presence_penalty": 0.0, + "frequency_penalty": 0.0, + "logit_bias": {}, + "user": "" + }, + "output": { + "id": "chatcmpl-7nzchPo6Jq9Uf8ekJ37FemRsyV0w8", + "object": "chat.completion", + "created": 1692149307, + "model": "gpt-35-turbo", + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "The X app is a social media platform that allows users to post content, follow breaking news, communicate privately, and create and join communities around various topics. It also offers a premium subscription service for users to expand their reach and earn money by creating exclusive content for paid subscribers. The app allows users to upload and watch videos up to 3 hours in length and write and read long-form posts. The app collects various types of data, including location and personal information, but data is encrypted in transit and not shared with third parties." + } + } + ], + "usage": { + "completion_tokens": 106, + "prompt_tokens": 451, + "total_tokens": 557 + } + }, + "start_time": 1692174501.692185, + "end_time": 1692174510.361987, + "error": null, + "children": null, + "node_name": null + } + ], + "node_name": "summarize_text_content" + }, + { + "name": "prepare_examples", + "type": "Tool", + "inputs": {}, + "output": [ + { + "url": "https://play.google.com/store/apps/details?id=com.spotify.music", + "text_content": "Spotify is a free music and podcast streaming app with millions of songs, albums, and original podcasts. It also offers audiobooks, so users can enjoy thousands of stories. It has a variety of features such as creating and sharing music playlists, discovering new music, and listening to popular and exclusive podcasts. It also has a Premium subscription option which allows users to download and listen offline, and access ad-free music. It is available on all devices and has a variety of genres and artists to choose from.", + "category": "App", + "evidence": "Both" + }, + { + "url": "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw", + "text_content": "NFL Sunday Ticket is a service offered by Google LLC that allows users to watch NFL games on YouTube. It is available in 2023 and is subject to the terms and privacy policy of Google LLC. It is also subject to YouTube's terms of use and any applicable laws.", + "category": "Channel", + "evidence": "URL" + }, + { + "url": "https://arxiv.org/abs/2303.04671", + "text_content": "Visual ChatGPT is a system that enables users to interact with ChatGPT by sending and receiving not only languages but also images, providing complex visual questions or visual editing instructions, and providing feedback and asking for corrected results. It incorporates different Visual Foundation Models and is publicly available. Experiments show that Visual ChatGPT opens the door to investigating the visual roles of ChatGPT with the help of Visual Foundation Models.", + "category": "Academic", + "evidence": "Text content" + }, + { + "url": "https://ab.politiaromana.ro/", + "text_content": "There is no content available for this text.", + "category": "None", + "evidence": "None" + } + ], + "start_time": 1692174510.859957, + "end_time": 1692174511.087491, + "error": null, + "children": null, + "node_name": "prepare_examples" + }, + { + "name": "AzureOpenAI.chat", + "type": "Tool", + "inputs": { + "prompt": "system:\nYour task is to classify a given url into one of the following categories:\nMovie, App, Academic, Channel, Profile, PDF or None based on the text content information.\nThe classification will be based on the url, the webpage text content summary, or both.\n\nuser:\nThe selection range of the value of \"category\" must be within \"Movie\", \"App\", \"Academic\", \"Channel\", \"Profile\", \"PDF\" and \"None\".\nThe selection range of the value of \"evidence\" must be within \"Url\", \"Text content\", and \"Both\".\nHere are a few examples:\n{% for ex in examples %}\nURL: {{ex.url}}\nText content: {{ex.text_content}}\nOUTPUT:\n{\"category\": \"{{ex.category}}\", \"evidence\": \"{{ex.evidence}}\"}\n\n{% endfor %}\n\nFor a given URL and text content, classify the url to complete the category and indicate evidence:\nURL: {{url}}\nText content: {{text_content}}.\nOUTPUT:", + "deployment_name": "gpt-35-turbo-0301", + "examples": [ + { + "url": "https://play.google.com/store/apps/details?id=com.spotify.music", + "text_content": "Spotify is a free music and podcast streaming app with millions of songs, albums, and original podcasts. It also offers audiobooks, so users can enjoy thousands of stories. It has a variety of features such as creating and sharing music playlists, discovering new music, and listening to popular and exclusive podcasts. It also has a Premium subscription option which allows users to download and listen offline, and access ad-free music. It is available on all devices and has a variety of genres and artists to choose from.", + "category": "App", + "evidence": "Both" + }, + { + "url": "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw", + "text_content": "NFL Sunday Ticket is a service offered by Google LLC that allows users to watch NFL games on YouTube. It is available in 2023 and is subject to the terms and privacy policy of Google LLC. It is also subject to YouTube's terms of use and any applicable laws.", + "category": "Channel", + "evidence": "URL" + }, + { + "url": "https://arxiv.org/abs/2303.04671", + "text_content": "Visual ChatGPT is a system that enables users to interact with ChatGPT by sending and receiving not only languages but also images, providing complex visual questions or visual editing instructions, and providing feedback and asking for corrected results. It incorporates different Visual Foundation Models and is publicly available. Experiments show that Visual ChatGPT opens the door to investigating the visual roles of ChatGPT with the help of Visual Foundation Models.", + "category": "Academic", + "evidence": "Text content" + }, + { + "url": "https://ab.politiaromana.ro/", + "text_content": "There is no content available for this text.", + "category": "None", + "evidence": "None" + } + ], + "max_tokens": 128, + "temperature": 0.2, + "text_content": "The X app is a social media platform that allows users to post content, follow breaking news, communicate privately, and create and join communities around various topics. It also offers a premium subscription service for users to expand their reach and earn money by creating exclusive content for paid subscribers. The app allows users to upload and watch videos up to 3 hours in length and write and read long-form posts. The app collects various types of data, including location and personal information, but data is encrypted in transit and not shared with third parties.", + "url": "https://play.google.com/store/apps/details?id=com.twitter.android" + }, + "output": "{\"category\": \"App\", \"evidence\": \"Both\"}", + "start_time": 1692174511.321618, + "end_time": 1692174512.42534, + "error": null, + "children": [ + { + "name": "openai.api_resources.chat_completion.ChatCompletion.create", + "type": "LLM", + "inputs": { + "api_base": "https://eastus.api.cognitive.microsoft.com/", + "api_type": "azure", + "api_version": "2023-03-15-preview", + "engine": "gpt-35-turbo-0301", + "messages": [ + { + "role": "system", + "content": "Your task is to classify a given url into one of the following categories:\nMovie, App, Academic, Channel, Profile, PDF or None based on the text content information.\nThe classification will be based on the url, the webpage text content summary, or both." + }, + { + "role": "user", + "content": "The selection range of the value of \"category\" must be within \"Movie\", \"App\", \"Academic\", \"Channel\", \"Profile\", \"PDF\" and \"None\".\nThe selection range of the value of \"evidence\" must be within \"Url\", \"Text content\", and \"Both\".\nHere are a few examples:\nURL: https://play.google.com/store/apps/details?id=com.spotify.music\nText content: Spotify is a free music and podcast streaming app with millions of songs, albums, and original podcasts. It also offers audiobooks, so users can enjoy thousands of stories. It has a variety of features such as creating and sharing music playlists, discovering new music, and listening to popular and exclusive podcasts. It also has a Premium subscription option which allows users to download and listen offline, and access ad-free music. It is available on all devices and has a variety of genres and artists to choose from.\nOUTPUT:\n{\"category\": \"App\", \"evidence\": \"Both\"}\n\nURL: https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw\nText content: NFL Sunday Ticket is a service offered by Google LLC that allows users to watch NFL games on YouTube. It is available in 2023 and is subject to the terms and privacy policy of Google LLC. It is also subject to YouTube's terms of use and any applicable laws.\nOUTPUT:\n{\"category\": \"Channel\", \"evidence\": \"URL\"}\n\nURL: https://arxiv.org/abs/2303.04671\nText content: Visual ChatGPT is a system that enables users to interact with ChatGPT by sending and receiving not only languages but also images, providing complex visual questions or visual editing instructions, and providing feedback and asking for corrected results. It incorporates different Visual Foundation Models and is publicly available. Experiments show that Visual ChatGPT opens the door to investigating the visual roles of ChatGPT with the help of Visual Foundation Models.\nOUTPUT:\n{\"category\": \"Academic\", \"evidence\": \"Text content\"}\n\nURL: https://ab.politiaromana.ro/\nText content: There is no content available for this text.\nOUTPUT:\n{\"category\": \"None\", \"evidence\": \"None\"}\n\n\nFor a given URL and text content, classify the url to complete the category and indicate evidence:\nURL: https://play.google.com/store/apps/details?id=com.twitter.android\nText content: The X app is a social media platform that allows users to post content, follow breaking news, communicate privately, and create and join communities around various topics. It also offers a premium subscription service for users to expand their reach and earn money by creating exclusive content for paid subscribers. The app allows users to upload and watch videos up to 3 hours in length and write and read long-form posts. The app collects various types of data, including location and personal information, but data is encrypted in transit and not shared with third parties..\nOUTPUT:" + } + ], + "temperature": 0.2, + "top_p": 1.0, + "n": 1, + "stream": false, + "stop": null, + "max_tokens": 128, + "presence_penalty": 0.0, + "frequency_penalty": 0.0, + "logit_bias": {}, + "user": "" + }, + "output": { + "id": "chatcmpl-7nzcl0z2XBAHPBuUDPQ7qZhYQdd2A", + "object": "chat.completion", + "created": 1692149311, + "model": "gpt-35-turbo", + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "{\"category\": \"App\", \"evidence\": \"Both\"}" + } + } + ], + "usage": { + "completion_tokens": 13, + "prompt_tokens": 673, + "total_tokens": 686 + } + }, + "start_time": 1692174511.588482, + "end_time": 1692174512.416786, + "error": null, + "children": null, + "node_name": null + } + ], + "node_name": "classify_with_llm" + }, + { + "name": "convert_to_dict", + "type": "Tool", + "inputs": { + "input_str": "{\"category\": \"App\", \"evidence\": \"Both\"}" + }, + "output": { + "category": "App", + "evidence": "Both" + }, + "start_time": 1692174512.913473, + "end_time": 1692174512.949204, + "error": null, + "children": null, + "node_name": "convert_to_dict" + } + ], + "variant_id": "", + "name": "", + "description": "", + "tags": null, + "system_metrics": { + "duration": 17.670048, + "total_tokens": 1243 + }, + "result": { + "category": "App", + "evidence": "Both" + }, + "upload_metrics": false + } + ], + "node_runs": [ + { + "node": "fetch_text_content_from_url", + "flow_run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283", + "run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283_fetch_text_content_from_url_0", + "status": "Completed", + "inputs": { + "url": "https://play.google.com/store/apps/details?id=com.twitter.android" + }, + "output": "X - Apps on Google Playgoogle_logo PlayGamesAppsMovies & TVBooksKidsnonesearchhelp_outline Sign in with Googleplay_appsLibrary & devicespaymentPayments & subscriptionsreviewsMy Play activityredeemOffersPlay PasssettingsSettingsPrivacy Policy \u2022 Terms of ServiceGamesAppsMovies & TVBooksKidsXX Corp.Contains adsIn-app purchases3.9star21.3M reviews1B+DownloadsMature 17+infoInstallShareAdd to wishlistAbout this apparrow_forwardThe X app is the trusted global digital town square for everyone.With X, you can:- Post content for the world to see and join public conversations- Stay up to date on breaking news and follow your interests- Stay better informed with extra context from Community Notes- Go live with Spaces for audio or stream live video- Communicate privately with Direct Messages- Subscribe to X Premium to expand your reach, get a blue checkmark, and more- Earn a living creating exclusive content for your paid subscribers and share in the ad revenue generated in replies to your posts- Create and join Communities around topics and interests, from sports to music to technology- Upload and watch videos up to 3 hours in length- Write and read long form posts like essays and blogs- Connect directly with your customers to help your business growUpdated onAug 8, 2023#4 top free socialSocialData safetyarrow_forwardSafety starts with understanding how developers collect and share your data. Data privacy and security practices may vary based on your use, region, and age. The developer provided this information and may update it over time.No data shared with third partiesLearn more about how developers declare sharingThis app may collect these data typesLocation, Personal info and 9 othersData is encrypted in transitYou can request that data be deletedSee detailsRatings and reviewsRatings and reviews are verifiedinfo_outlinearrow_forwardRatings and reviews are verifiedinfo_outlinephone_androidPhonetablet_androidTabletwatchWatchlaptopChromebooktvTV3.920.5M reviews54321J Dmore_ve", + "metrics": null, + "error": null, + "parent_run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283_0", + "start_time": "2023-08-16T01:28:15.428718Z", + "end_time": "2023-08-16T01:28:21.514779Z", + "index": 0, + "api_calls": [ + { + "name": "fetch_text_content_from_url", + "type": "Tool", + "inputs": { + "url": "https://play.google.com/store/apps/details?id=com.twitter.android" + }, + "output": "X - Apps on Google Playgoogle_logo PlayGamesAppsMovies & TVBooksKidsnonesearchhelp_outline Sign in with Googleplay_appsLibrary & devicespaymentPayments & subscriptionsreviewsMy Play activityredeemOffersPlay PasssettingsSettingsPrivacy Policy \u2022 Terms of ServiceGamesAppsMovies & TVBooksKidsXX Corp.Contains adsIn-app purchases3.9star21.3M reviews1B+DownloadsMature 17+infoInstallShareAdd to wishlistAbout this apparrow_forwardThe X app is the trusted global digital town square for everyone.With X, you can:- Post content for the world to see and join public conversations- Stay up to date on breaking news and follow your interests- Stay better informed with extra context from Community Notes- Go live with Spaces for audio or stream live video- Communicate privately with Direct Messages- Subscribe to X Premium to expand your reach, get a blue checkmark, and more- Earn a living creating exclusive content for your paid subscribers and share in the ad revenue generated in replies to your posts- Create and join Communities around topics and interests, from sports to music to technology- Upload and watch videos up to 3 hours in length- Write and read long form posts like essays and blogs- Connect directly with your customers to help your business growUpdated onAug 8, 2023#4 top free socialSocialData safetyarrow_forwardSafety starts with understanding how developers collect and share your data. Data privacy and security practices may vary based on your use, region, and age. The developer provided this information and may update it over time.No data shared with third partiesLearn more about how developers declare sharingThis app may collect these data typesLocation, Personal info and 9 othersData is encrypted in transitYou can request that data be deletedSee detailsRatings and reviewsRatings and reviews are verifiedinfo_outlinearrow_forwardRatings and reviews are verifiedinfo_outlinephone_androidPhonetablet_androidTabletwatchWatchlaptopChromebooktvTV3.920.5M reviews54321J Dmore_ve", + "start_time": 1692174495.428718, + "end_time": 1692174501.405176, + "error": null, + "children": null, + "node_name": "fetch_text_content_from_url" + } + ], + "variant_id": "", + "cached_run_id": null, + "cached_flow_run_id": null, + "logs": { + "stdout": "", + "stderr": "" + }, + "system_metrics": { + "duration": 6.086061 + }, + "result": "X - Apps on Google Playgoogle_logo PlayGamesAppsMovies & TVBooksKidsnonesearchhelp_outline Sign in with Googleplay_appsLibrary & devicespaymentPayments & subscriptionsreviewsMy Play activityredeemOffersPlay PasssettingsSettingsPrivacy Policy \u2022 Terms of ServiceGamesAppsMovies & TVBooksKidsXX Corp.Contains adsIn-app purchases3.9star21.3M reviews1B+DownloadsMature 17+infoInstallShareAdd to wishlistAbout this apparrow_forwardThe X app is the trusted global digital town square for everyone.With X, you can:- Post content for the world to see and join public conversations- Stay up to date on breaking news and follow your interests- Stay better informed with extra context from Community Notes- Go live with Spaces for audio or stream live video- Communicate privately with Direct Messages- Subscribe to X Premium to expand your reach, get a blue checkmark, and more- Earn a living creating exclusive content for your paid subscribers and share in the ad revenue generated in replies to your posts- Create and join Communities around topics and interests, from sports to music to technology- Upload and watch videos up to 3 hours in length- Write and read long form posts like essays and blogs- Connect directly with your customers to help your business growUpdated onAug 8, 2023#4 top free socialSocialData safetyarrow_forwardSafety starts with understanding how developers collect and share your data. Data privacy and security practices may vary based on your use, region, and age. The developer provided this information and may update it over time.No data shared with third partiesLearn more about how developers declare sharingThis app may collect these data typesLocation, Personal info and 9 othersData is encrypted in transitYou can request that data be deletedSee detailsRatings and reviewsRatings and reviews are verifiedinfo_outlinearrow_forwardRatings and reviews are verifiedinfo_outlinephone_androidPhonetablet_androidTabletwatchWatchlaptopChromebooktvTV3.920.5M reviews54321J Dmore_ve" + }, + { + "node": "summarize_text_content", + "flow_run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283", + "run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283_summarize_text_content_0", + "status": "Completed", + "inputs": { + "prompt": "system:\nPlease summarize the following text in one paragraph. 100 words.\nDo not add any information that is not in the text.\n\nuser:\nText: {{text}}\nSummary: ", + "deployment_name": "gpt-35-turbo-0301", + "max_tokens": 128, + "temperature": 0.2, + "text": "X - Apps on Google Playgoogle_logo PlayGamesAppsMovies & TVBooksKidsnonesearchhelp_outline Sign in with Googleplay_appsLibrary & devicespaymentPayments & subscriptionsreviewsMy Play activityredeemOffersPlay PasssettingsSettingsPrivacy Policy \u2022 Terms of ServiceGamesAppsMovies & TVBooksKidsXX Corp.Contains adsIn-app purchases3.9star21.3M reviews1B+DownloadsMature 17+infoInstallShareAdd to wishlistAbout this apparrow_forwardThe X app is the trusted global digital town square for everyone.With X, you can:- Post content for the world to see and join public conversations- Stay up to date on breaking news and follow your interests- Stay better informed with extra context from Community Notes- Go live with Spaces for audio or stream live video- Communicate privately with Direct Messages- Subscribe to X Premium to expand your reach, get a blue checkmark, and more- Earn a living creating exclusive content for your paid subscribers and share in the ad revenue generated in replies to your posts- Create and join Communities around topics and interests, from sports to music to technology- Upload and watch videos up to 3 hours in length- Write and read long form posts like essays and blogs- Connect directly with your customers to help your business growUpdated onAug 8, 2023#4 top free socialSocialData safetyarrow_forwardSafety starts with understanding how developers collect and share your data. Data privacy and security practices may vary based on your use, region, and age. The developer provided this information and may update it over time.No data shared with third partiesLearn more about how developers declare sharingThis app may collect these data typesLocation, Personal info and 9 othersData is encrypted in transitYou can request that data be deletedSee detailsRatings and reviewsRatings and reviews are verifiedinfo_outlinearrow_forwardRatings and reviews are verifiedinfo_outlinephone_androidPhonetablet_androidTabletwatchWatchlaptopChromebooktvTV3.920.5M reviews54321J Dmore_ve" + }, + "output": "The X app is a social media platform that allows users to post content, follow breaking news, communicate privately, and create and join communities around various topics. It also offers a premium subscription service for users to expand their reach and earn money by creating exclusive content for paid subscribers. The app allows users to upload and watch videos up to 3 hours in length and write and read long-form posts. The app collects various types of data, including location and personal information, but data is encrypted in transit and not shared with third parties.", + "metrics": null, + "error": null, + "parent_run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283_0", + "start_time": "2023-08-16T01:28:21.594809Z", + "end_time": "2023-08-16T01:28:30.825224Z", + "index": 0, + "api_calls": [ + { + "name": "AzureOpenAI.chat", + "type": "Tool", + "inputs": { + "prompt": "system:\nPlease summarize the following text in one paragraph. 100 words.\nDo not add any information that is not in the text.\n\nuser:\nText: {{text}}\nSummary: ", + "deployment_name": "gpt-35-turbo-0301", + "max_tokens": 128, + "temperature": 0.2, + "text": "X - Apps on Google Playgoogle_logo PlayGamesAppsMovies & TVBooksKidsnonesearchhelp_outline Sign in with Googleplay_appsLibrary & devicespaymentPayments & subscriptionsreviewsMy Play activityredeemOffersPlay PasssettingsSettingsPrivacy Policy \u2022 Terms of ServiceGamesAppsMovies & TVBooksKidsXX Corp.Contains adsIn-app purchases3.9star21.3M reviews1B+DownloadsMature 17+infoInstallShareAdd to wishlistAbout this apparrow_forwardThe X app is the trusted global digital town square for everyone.With X, you can:- Post content for the world to see and join public conversations- Stay up to date on breaking news and follow your interests- Stay better informed with extra context from Community Notes- Go live with Spaces for audio or stream live video- Communicate privately with Direct Messages- Subscribe to X Premium to expand your reach, get a blue checkmark, and more- Earn a living creating exclusive content for your paid subscribers and share in the ad revenue generated in replies to your posts- Create and join Communities around topics and interests, from sports to music to technology- Upload and watch videos up to 3 hours in length- Write and read long form posts like essays and blogs- Connect directly with your customers to help your business growUpdated onAug 8, 2023#4 top free socialSocialData safetyarrow_forwardSafety starts with understanding how developers collect and share your data. Data privacy and security practices may vary based on your use, region, and age. The developer provided this information and may update it over time.No data shared with third partiesLearn more about how developers declare sharingThis app may collect these data typesLocation, Personal info and 9 othersData is encrypted in transitYou can request that data be deletedSee detailsRatings and reviewsRatings and reviews are verifiedinfo_outlinearrow_forwardRatings and reviews are verifiedinfo_outlinephone_androidPhonetablet_androidTabletwatchWatchlaptopChromebooktvTV3.920.5M reviews54321J Dmore_ve" + }, + "output": "The X app is a social media platform that allows users to post content, follow breaking news, communicate privately, and create and join communities around various topics. It also offers a premium subscription service for users to expand their reach and earn money by creating exclusive content for paid subscribers. The app allows users to upload and watch videos up to 3 hours in length and write and read long-form posts. The app collects various types of data, including location and personal information, but data is encrypted in transit and not shared with third parties.", + "start_time": 1692174501.596812, + "end_time": 1692174510.370567, + "error": null, + "children": [ + { + "name": "openai.api_resources.chat_completion.ChatCompletion.create", + "type": "LLM", + "inputs": { + "api_base": "https://eastus.api.cognitive.microsoft.com/", + "api_type": "azure", + "api_version": "2023-03-15-preview", + "engine": "gpt-35-turbo-0301", + "messages": [ + { + "role": "system", + "content": "Please summarize the following text in one paragraph. 100 words.\nDo not add any information that is not in the text." + }, + { + "role": "user", + "content": "Text: X - Apps on Google Playgoogle_logo PlayGamesAppsMovies & TVBooksKidsnonesearchhelp_outline Sign in with Googleplay_appsLibrary & devicespaymentPayments & subscriptionsreviewsMy Play activityredeemOffersPlay PasssettingsSettingsPrivacy Policy \u2022 Terms of ServiceGamesAppsMovies & TVBooksKidsXX Corp.Contains adsIn-app purchases3.9star21.3M reviews1B+DownloadsMature 17+infoInstallShareAdd to wishlistAbout this apparrow_forwardThe X app is the trusted global digital town square for everyone.With X, you can:- Post content for the world to see and join public conversations- Stay up to date on breaking news and follow your interests- Stay better informed with extra context from Community Notes- Go live with Spaces for audio or stream live video- Communicate privately with Direct Messages- Subscribe to X Premium to expand your reach, get a blue checkmark, and more- Earn a living creating exclusive content for your paid subscribers and share in the ad revenue generated in replies to your posts- Create and join Communities around topics and interests, from sports to music to technology- Upload and watch videos up to 3 hours in length- Write and read long form posts like essays and blogs- Connect directly with your customers to help your business growUpdated onAug 8, 2023#4 top free socialSocialData safetyarrow_forwardSafety starts with understanding how developers collect and share your data. Data privacy and security practices may vary based on your use, region, and age. The developer provided this information and may update it over time.No data shared with third partiesLearn more about how developers declare sharingThis app may collect these data typesLocation, Personal info and 9 othersData is encrypted in transitYou can request that data be deletedSee detailsRatings and reviewsRatings and reviews are verifiedinfo_outlinearrow_forwardRatings and reviews are verifiedinfo_outlinephone_androidPhonetablet_androidTabletwatchWatchlaptopChromebooktvTV3.920.5M reviews54321J Dmore_ve\nSummary: " + } + ], + "temperature": 0.2, + "top_p": 1.0, + "n": 1, + "stream": false, + "stop": null, + "max_tokens": 128, + "presence_penalty": 0.0, + "frequency_penalty": 0.0, + "logit_bias": {}, + "user": "" + }, + "output": { + "id": "chatcmpl-7nzchPo6Jq9Uf8ekJ37FemRsyV0w8", + "object": "chat.completion", + "created": 1692149307, + "model": "gpt-35-turbo", + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "The X app is a social media platform that allows users to post content, follow breaking news, communicate privately, and create and join communities around various topics. It also offers a premium subscription service for users to expand their reach and earn money by creating exclusive content for paid subscribers. The app allows users to upload and watch videos up to 3 hours in length and write and read long-form posts. The app collects various types of data, including location and personal information, but data is encrypted in transit and not shared with third parties." + } + } + ], + "usage": { + "completion_tokens": 106, + "prompt_tokens": 451, + "total_tokens": 557 + } + }, + "start_time": 1692174501.692185, + "end_time": 1692174510.361987, + "error": null, + "children": null, + "node_name": null + } + ], + "node_name": "summarize_text_content" + } + ], + "variant_id": "", + "cached_run_id": null, + "cached_flow_run_id": null, + "logs": { + "stdout": "", + "stderr": "" + }, + "system_metrics": { + "completion_tokens": 106, + "prompt_tokens": 451, + "total_tokens": 557, + "duration": 9.230415 + }, + "result": "The X app is a social media platform that allows users to post content, follow breaking news, communicate privately, and create and join communities around various topics. It also offers a premium subscription service for users to expand their reach and earn money by creating exclusive content for paid subscribers. The app allows users to upload and watch videos up to 3 hours in length and write and read long-form posts. The app collects various types of data, including location and personal information, but data is encrypted in transit and not shared with third parties." + }, + { + "node": "prepare_examples", + "flow_run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283", + "run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283_prepare_examples_0", + "status": "Completed", + "inputs": {}, + "output": [ + { + "url": "https://play.google.com/store/apps/details?id=com.spotify.music", + "text_content": "Spotify is a free music and podcast streaming app with millions of songs, albums, and original podcasts. It also offers audiobooks, so users can enjoy thousands of stories. It has a variety of features such as creating and sharing music playlists, discovering new music, and listening to popular and exclusive podcasts. It also has a Premium subscription option which allows users to download and listen offline, and access ad-free music. It is available on all devices and has a variety of genres and artists to choose from.", + "category": "App", + "evidence": "Both" + }, + { + "url": "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw", + "text_content": "NFL Sunday Ticket is a service offered by Google LLC that allows users to watch NFL games on YouTube. It is available in 2023 and is subject to the terms and privacy policy of Google LLC. It is also subject to YouTube's terms of use and any applicable laws.", + "category": "Channel", + "evidence": "URL" + }, + { + "url": "https://arxiv.org/abs/2303.04671", + "text_content": "Visual ChatGPT is a system that enables users to interact with ChatGPT by sending and receiving not only languages but also images, providing complex visual questions or visual editing instructions, and providing feedback and asking for corrected results. It incorporates different Visual Foundation Models and is publicly available. Experiments show that Visual ChatGPT opens the door to investigating the visual roles of ChatGPT with the help of Visual Foundation Models.", + "category": "Academic", + "evidence": "Text content" + }, + { + "url": "https://ab.politiaromana.ro/", + "text_content": "There is no content available for this text.", + "category": "None", + "evidence": "None" + } + ], + "metrics": null, + "error": null, + "parent_run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283_0", + "start_time": "2023-08-16T01:28:30.858961Z", + "end_time": "2023-08-16T01:28:31.291895Z", + "index": 0, + "api_calls": [ + { + "name": "prepare_examples", + "type": "Tool", + "inputs": {}, + "output": [ + { + "url": "https://play.google.com/store/apps/details?id=com.spotify.music", + "text_content": "Spotify is a free music and podcast streaming app with millions of songs, albums, and original podcasts. It also offers audiobooks, so users can enjoy thousands of stories. It has a variety of features such as creating and sharing music playlists, discovering new music, and listening to popular and exclusive podcasts. It also has a Premium subscription option which allows users to download and listen offline, and access ad-free music. It is available on all devices and has a variety of genres and artists to choose from.", + "category": "App", + "evidence": "Both" + }, + { + "url": "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw", + "text_content": "NFL Sunday Ticket is a service offered by Google LLC that allows users to watch NFL games on YouTube. It is available in 2023 and is subject to the terms and privacy policy of Google LLC. It is also subject to YouTube's terms of use and any applicable laws.", + "category": "Channel", + "evidence": "URL" + }, + { + "url": "https://arxiv.org/abs/2303.04671", + "text_content": "Visual ChatGPT is a system that enables users to interact with ChatGPT by sending and receiving not only languages but also images, providing complex visual questions or visual editing instructions, and providing feedback and asking for corrected results. It incorporates different Visual Foundation Models and is publicly available. Experiments show that Visual ChatGPT opens the door to investigating the visual roles of ChatGPT with the help of Visual Foundation Models.", + "category": "Academic", + "evidence": "Text content" + }, + { + "url": "https://ab.politiaromana.ro/", + "text_content": "There is no content available for this text.", + "category": "None", + "evidence": "None" + } + ], + "start_time": 1692174510.859957, + "end_time": 1692174511.087491, + "error": null, + "children": null, + "node_name": "prepare_examples" + } + ], + "variant_id": "", + "cached_run_id": null, + "cached_flow_run_id": null, + "logs": { + "stdout": "", + "stderr": "" + }, + "system_metrics": { + "duration": 0.432934 + }, + "result": [ + { + "url": "https://play.google.com/store/apps/details?id=com.spotify.music", + "text_content": "Spotify is a free music and podcast streaming app with millions of songs, albums, and original podcasts. It also offers audiobooks, so users can enjoy thousands of stories. It has a variety of features such as creating and sharing music playlists, discovering new music, and listening to popular and exclusive podcasts. It also has a Premium subscription option which allows users to download and listen offline, and access ad-free music. It is available on all devices and has a variety of genres and artists to choose from.", + "category": "App", + "evidence": "Both" + }, + { + "url": "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw", + "text_content": "NFL Sunday Ticket is a service offered by Google LLC that allows users to watch NFL games on YouTube. It is available in 2023 and is subject to the terms and privacy policy of Google LLC. It is also subject to YouTube's terms of use and any applicable laws.", + "category": "Channel", + "evidence": "URL" + }, + { + "url": "https://arxiv.org/abs/2303.04671", + "text_content": "Visual ChatGPT is a system that enables users to interact with ChatGPT by sending and receiving not only languages but also images, providing complex visual questions or visual editing instructions, and providing feedback and asking for corrected results. It incorporates different Visual Foundation Models and is publicly available. Experiments show that Visual ChatGPT opens the door to investigating the visual roles of ChatGPT with the help of Visual Foundation Models.", + "category": "Academic", + "evidence": "Text content" + }, + { + "url": "https://ab.politiaromana.ro/", + "text_content": "There is no content available for this text.", + "category": "None", + "evidence": "None" + } + ] + }, + { + "node": "classify_with_llm", + "flow_run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283", + "run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283_classify_with_llm_0", + "status": "Completed", + "inputs": { + "prompt": "system:\nYour task is to classify a given url into one of the following categories:\nMovie, App, Academic, Channel, Profile, PDF or None based on the text content information.\nThe classification will be based on the url, the webpage text content summary, or both.\n\nuser:\nThe selection range of the value of \"category\" must be within \"Movie\", \"App\", \"Academic\", \"Channel\", \"Profile\", \"PDF\" and \"None\".\nThe selection range of the value of \"evidence\" must be within \"Url\", \"Text content\", and \"Both\".\nHere are a few examples:\n{% for ex in examples %}\nURL: {{ex.url}}\nText content: {{ex.text_content}}\nOUTPUT:\n{\"category\": \"{{ex.category}}\", \"evidence\": \"{{ex.evidence}}\"}\n\n{% endfor %}\n\nFor a given URL and text content, classify the url to complete the category and indicate evidence:\nURL: {{url}}\nText content: {{text_content}}.\nOUTPUT:", + "deployment_name": "gpt-35-turbo-0301", + "examples": [ + { + "url": "https://play.google.com/store/apps/details?id=com.spotify.music", + "text_content": "Spotify is a free music and podcast streaming app with millions of songs, albums, and original podcasts. It also offers audiobooks, so users can enjoy thousands of stories. It has a variety of features such as creating and sharing music playlists, discovering new music, and listening to popular and exclusive podcasts. It also has a Premium subscription option which allows users to download and listen offline, and access ad-free music. It is available on all devices and has a variety of genres and artists to choose from.", + "category": "App", + "evidence": "Both" + }, + { + "url": "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw", + "text_content": "NFL Sunday Ticket is a service offered by Google LLC that allows users to watch NFL games on YouTube. It is available in 2023 and is subject to the terms and privacy policy of Google LLC. It is also subject to YouTube's terms of use and any applicable laws.", + "category": "Channel", + "evidence": "URL" + }, + { + "url": "https://arxiv.org/abs/2303.04671", + "text_content": "Visual ChatGPT is a system that enables users to interact with ChatGPT by sending and receiving not only languages but also images, providing complex visual questions or visual editing instructions, and providing feedback and asking for corrected results. It incorporates different Visual Foundation Models and is publicly available. Experiments show that Visual ChatGPT opens the door to investigating the visual roles of ChatGPT with the help of Visual Foundation Models.", + "category": "Academic", + "evidence": "Text content" + }, + { + "url": "https://ab.politiaromana.ro/", + "text_content": "There is no content available for this text.", + "category": "None", + "evidence": "None" + } + ], + "max_tokens": 128, + "temperature": 0.2, + "text_content": "The X app is a social media platform that allows users to post content, follow breaking news, communicate privately, and create and join communities around various topics. It also offers a premium subscription service for users to expand their reach and earn money by creating exclusive content for paid subscribers. The app allows users to upload and watch videos up to 3 hours in length and write and read long-form posts. The app collects various types of data, including location and personal information, but data is encrypted in transit and not shared with third parties.", + "url": "https://play.google.com/store/apps/details?id=com.twitter.android" + }, + "output": "{\"category\": \"App\", \"evidence\": \"Both\"}", + "metrics": null, + "error": null, + "parent_run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283_0", + "start_time": "2023-08-16T01:28:31.320617Z", + "end_time": "2023-08-16T01:28:32.902899Z", + "index": 0, + "api_calls": [ + { + "name": "AzureOpenAI.chat", + "type": "Tool", + "inputs": { + "prompt": "system:\nYour task is to classify a given url into one of the following categories:\nMovie, App, Academic, Channel, Profile, PDF or None based on the text content information.\nThe classification will be based on the url, the webpage text content summary, or both.\n\nuser:\nThe selection range of the value of \"category\" must be within \"Movie\", \"App\", \"Academic\", \"Channel\", \"Profile\", \"PDF\" and \"None\".\nThe selection range of the value of \"evidence\" must be within \"Url\", \"Text content\", and \"Both\".\nHere are a few examples:\n{% for ex in examples %}\nURL: {{ex.url}}\nText content: {{ex.text_content}}\nOUTPUT:\n{\"category\": \"{{ex.category}}\", \"evidence\": \"{{ex.evidence}}\"}\n\n{% endfor %}\n\nFor a given URL and text content, classify the url to complete the category and indicate evidence:\nURL: {{url}}\nText content: {{text_content}}.\nOUTPUT:", + "deployment_name": "gpt-35-turbo-0301", + "examples": [ + { + "url": "https://play.google.com/store/apps/details?id=com.spotify.music", + "text_content": "Spotify is a free music and podcast streaming app with millions of songs, albums, and original podcasts. It also offers audiobooks, so users can enjoy thousands of stories. It has a variety of features such as creating and sharing music playlists, discovering new music, and listening to popular and exclusive podcasts. It also has a Premium subscription option which allows users to download and listen offline, and access ad-free music. It is available on all devices and has a variety of genres and artists to choose from.", + "category": "App", + "evidence": "Both" + }, + { + "url": "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw", + "text_content": "NFL Sunday Ticket is a service offered by Google LLC that allows users to watch NFL games on YouTube. It is available in 2023 and is subject to the terms and privacy policy of Google LLC. It is also subject to YouTube's terms of use and any applicable laws.", + "category": "Channel", + "evidence": "URL" + }, + { + "url": "https://arxiv.org/abs/2303.04671", + "text_content": "Visual ChatGPT is a system that enables users to interact with ChatGPT by sending and receiving not only languages but also images, providing complex visual questions or visual editing instructions, and providing feedback and asking for corrected results. It incorporates different Visual Foundation Models and is publicly available. Experiments show that Visual ChatGPT opens the door to investigating the visual roles of ChatGPT with the help of Visual Foundation Models.", + "category": "Academic", + "evidence": "Text content" + }, + { + "url": "https://ab.politiaromana.ro/", + "text_content": "There is no content available for this text.", + "category": "None", + "evidence": "None" + } + ], + "max_tokens": 128, + "temperature": 0.2, + "text_content": "The X app is a social media platform that allows users to post content, follow breaking news, communicate privately, and create and join communities around various topics. It also offers a premium subscription service for users to expand their reach and earn money by creating exclusive content for paid subscribers. The app allows users to upload and watch videos up to 3 hours in length and write and read long-form posts. The app collects various types of data, including location and personal information, but data is encrypted in transit and not shared with third parties.", + "url": "https://play.google.com/store/apps/details?id=com.twitter.android" + }, + "output": "{\"category\": \"App\", \"evidence\": \"Both\"}", + "start_time": 1692174511.321618, + "end_time": 1692174512.42534, + "error": null, + "children": [ + { + "name": "openai.api_resources.chat_completion.ChatCompletion.create", + "type": "LLM", + "inputs": { + "api_base": "https://eastus.api.cognitive.microsoft.com/", + "api_type": "azure", + "api_version": "2023-03-15-preview", + "engine": "gpt-35-turbo-0301", + "messages": [ + { + "role": "system", + "content": "Your task is to classify a given url into one of the following categories:\nMovie, App, Academic, Channel, Profile, PDF or None based on the text content information.\nThe classification will be based on the url, the webpage text content summary, or both." + }, + { + "role": "user", + "content": "The selection range of the value of \"category\" must be within \"Movie\", \"App\", \"Academic\", \"Channel\", \"Profile\", \"PDF\" and \"None\".\nThe selection range of the value of \"evidence\" must be within \"Url\", \"Text content\", and \"Both\".\nHere are a few examples:\nURL: https://play.google.com/store/apps/details?id=com.spotify.music\nText content: Spotify is a free music and podcast streaming app with millions of songs, albums, and original podcasts. It also offers audiobooks, so users can enjoy thousands of stories. It has a variety of features such as creating and sharing music playlists, discovering new music, and listening to popular and exclusive podcasts. It also has a Premium subscription option which allows users to download and listen offline, and access ad-free music. It is available on all devices and has a variety of genres and artists to choose from.\nOUTPUT:\n{\"category\": \"App\", \"evidence\": \"Both\"}\n\nURL: https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw\nText content: NFL Sunday Ticket is a service offered by Google LLC that allows users to watch NFL games on YouTube. It is available in 2023 and is subject to the terms and privacy policy of Google LLC. It is also subject to YouTube's terms of use and any applicable laws.\nOUTPUT:\n{\"category\": \"Channel\", \"evidence\": \"URL\"}\n\nURL: https://arxiv.org/abs/2303.04671\nText content: Visual ChatGPT is a system that enables users to interact with ChatGPT by sending and receiving not only languages but also images, providing complex visual questions or visual editing instructions, and providing feedback and asking for corrected results. It incorporates different Visual Foundation Models and is publicly available. Experiments show that Visual ChatGPT opens the door to investigating the visual roles of ChatGPT with the help of Visual Foundation Models.\nOUTPUT:\n{\"category\": \"Academic\", \"evidence\": \"Text content\"}\n\nURL: https://ab.politiaromana.ro/\nText content: There is no content available for this text.\nOUTPUT:\n{\"category\": \"None\", \"evidence\": \"None\"}\n\n\nFor a given URL and text content, classify the url to complete the category and indicate evidence:\nURL: https://play.google.com/store/apps/details?id=com.twitter.android\nText content: The X app is a social media platform that allows users to post content, follow breaking news, communicate privately, and create and join communities around various topics. It also offers a premium subscription service for users to expand their reach and earn money by creating exclusive content for paid subscribers. The app allows users to upload and watch videos up to 3 hours in length and write and read long-form posts. The app collects various types of data, including location and personal information, but data is encrypted in transit and not shared with third parties..\nOUTPUT:" + } + ], + "temperature": 0.2, + "top_p": 1.0, + "n": 1, + "stream": false, + "stop": null, + "max_tokens": 128, + "presence_penalty": 0.0, + "frequency_penalty": 0.0, + "logit_bias": {}, + "user": "" + }, + "output": { + "id": "chatcmpl-7nzcl0z2XBAHPBuUDPQ7qZhYQdd2A", + "object": "chat.completion", + "created": 1692149311, + "model": "gpt-35-turbo", + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "{\"category\": \"App\", \"evidence\": \"Both\"}" + } + } + ], + "usage": { + "completion_tokens": 13, + "prompt_tokens": 673, + "total_tokens": 686 + } + }, + "start_time": 1692174511.588482, + "end_time": 1692174512.416786, + "error": null, + "children": null, + "node_name": null + } + ], + "node_name": "classify_with_llm" + } + ], + "variant_id": "", + "cached_run_id": null, + "cached_flow_run_id": null, + "logs": { + "stdout": "", + "stderr": "" + }, + "system_metrics": { + "completion_tokens": 13, + "prompt_tokens": 673, + "total_tokens": 686, + "duration": 1.582282 + }, + "result": "{\"category\": \"App\", \"evidence\": \"Both\"}" + }, + { + "node": "convert_to_dict", + "flow_run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283", + "run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283_convert_to_dict_0", + "status": "Completed", + "inputs": { + "input_str": "{\"category\": \"App\", \"evidence\": \"Both\"}" + }, + "output": { + "category": "App", + "evidence": "Both" + }, + "metrics": null, + "error": null, + "parent_run_id": "6f02f4b3-6822-4a33-8b55-c32aad105283_0", + "start_time": "2023-08-16T01:28:32.913473Z", + "end_time": "2023-08-16T01:28:33.075090Z", + "index": 0, + "api_calls": [ + { + "name": "convert_to_dict", + "type": "Tool", + "inputs": { + "input_str": "{\"category\": \"App\", \"evidence\": \"Both\"}" + }, + "output": { + "category": "App", + "evidence": "Both" + }, + "start_time": 1692174512.913473, + "end_time": 1692174512.949204, + "error": null, + "children": null, + "node_name": "convert_to_dict" + } + ], + "variant_id": "", + "cached_run_id": null, + "cached_flow_run_id": null, + "logs": { + "stdout": "", + "stderr": "" + }, + "system_metrics": { + "duration": 0.161617 + }, + "result": { + "category": "App", + "evidence": "Both" + } + } + ] +} \ No newline at end of file diff --git a/promptflow/web-classification/.promptflow/flow.layout.json b/promptflow/web-classification/.promptflow/flow.layout.json new file mode 100644 index 0000000..4db355e --- /dev/null +++ b/promptflow/web-classification/.promptflow/flow.layout.json @@ -0,0 +1,40 @@ +{ + "nodeLayouts": { + "inputs": { + "x": 67, + "y": 62, + "index": -1 + }, + "outputs": { + "x": 122, + "y": 612, + "index": -1 + }, + "fetch_text_content_from_url": { + "x": 12, + "y": 172, + "index": 0 + }, + "summarize_text_content": { + "x": 12, + "y": 282, + "index": 1 + }, + "prepare_examples": { + "x": 233, + "y": 282, + "index": 2 + }, + "classify_with_llm": { + "x": 122, + "y": 392, + "index": 3 + }, + "convert_to_dict": { + "x": 122, + "y": 502, + "index": 4 + } + }, + "orientation": "Vertical" +} \ No newline at end of file diff --git a/promptflow/web-classification/.promptflow/flow.log b/promptflow/web-classification/.promptflow/flow.log new file mode 100644 index 0000000..d0ad5a3 --- /dev/null +++ b/promptflow/web-classification/.promptflow/flow.log @@ -0,0 +1,634 @@ +2023-08-14 16:02:09 -0700 18848 execution.flow INFO Executing node fetch_text_content_from_url. node run id: a32fa4ef-c0ab-49aa-b217-f3755619ff3f_fetch_text_content_from_url_0 +2023-08-14 16:02:10 -0700 18848 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-14 16:02:10 -0700 18848 execution.flow INFO Executing node summarize_text_content. node run id: a32fa4ef-c0ab-49aa-b217-f3755619ff3f_summarize_text_content_0 +2023-08-14 16:02:10 -0700 18848 execution WARNING [summarize_text_content in line 0] stderr> Exception occurs: APIConnectionError: Error communicating with OpenAI: Invalid URL 'aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? +2023-08-14 16:02:10 -0700 18848 execution ERROR Node summarize_text_content in line 0 failed. Exception: OpenAI API hits APIConnectionError: Error communicating with OpenAI: Invalid URL 'aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]. +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 596, in request_raw + result = _thread_context.session.request( + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\sessions.py", line 575, in request + prep = self.prepare_request(req) + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\sessions.py", line 486, in prepare_request + p.prepare( + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\models.py", line 368, in prepare + self.prepare_url(url, params) + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\models.py", line 439, in prepare_url + raise MissingSchema( +requests.exceptions.MissingSchema: Invalid URL 'aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 156, in wrapper + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\aoai.py", line 152, in chat + completion = openai.ChatCompletion.create(**{**self._connection_dict, **params}) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 91, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 45, in wrapped_method + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create + return super().create(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create + response, _, api_key = requestor.request( + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 288, in request + result = self.request_raw( + ^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 609, in request_raw + raise error.APIConnectionError( +openai.error.APIConnectionError: Error communicating with OpenAI: Invalid URL 'aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 114, in invoke_tool_with_cache + result = self.invoke_tool(f, args, kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 158, in invoke_tool + raise e + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 152, in invoke_tool + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 171, in wrapper + raise WrappedOpenAIError(e) +promptflow.tools.exception.WrappedOpenAIError: OpenAI API hits APIConnectionError: Error communicating with OpenAI: Invalid URL 'aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors] +2023-08-14 16:04:08 -0700 17900 execution.flow INFO Executing node fetch_text_content_from_url. node run id: 3dcb7e81-d3b4-4f19-8a71-ba00d3566cc0_fetch_text_content_from_url_0 +2023-08-14 16:04:09 -0700 17900 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-14 16:04:09 -0700 17900 execution.flow INFO Executing node summarize_text_content. node run id: 3dcb7e81-d3b4-4f19-8a71-ba00d3566cc0_summarize_text_content_0 +2023-08-14 16:04:09 -0700 17900 execution WARNING [summarize_text_content in line 0] stderr> Exception occurs: APIConnectionError: Error communicating with OpenAI: Invalid URL 'aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? +2023-08-14 16:04:09 -0700 17900 execution ERROR Node summarize_text_content in line 0 failed. Exception: OpenAI API hits APIConnectionError: Error communicating with OpenAI: Invalid URL 'aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]. +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 596, in request_raw + result = _thread_context.session.request( + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\sessions.py", line 575, in request + prep = self.prepare_request(req) + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\sessions.py", line 486, in prepare_request + p.prepare( + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\models.py", line 368, in prepare + self.prepare_url(url, params) + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\models.py", line 439, in prepare_url + raise MissingSchema( +requests.exceptions.MissingSchema: Invalid URL 'aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 156, in wrapper + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\aoai.py", line 152, in chat + completion = openai.ChatCompletion.create(**{**self._connection_dict, **params}) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 91, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 45, in wrapped_method + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create + return super().create(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create + response, _, api_key = requestor.request( + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 288, in request + result = self.request_raw( + ^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 609, in request_raw + raise error.APIConnectionError( +openai.error.APIConnectionError: Error communicating with OpenAI: Invalid URL 'aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 114, in invoke_tool_with_cache + result = self.invoke_tool(f, args, kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 158, in invoke_tool + raise e + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 152, in invoke_tool + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 171, in wrapper + raise WrappedOpenAIError(e) +promptflow.tools.exception.WrappedOpenAIError: OpenAI API hits APIConnectionError: Error communicating with OpenAI: Invalid URL 'aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://aoai-api-endpoint/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors] +2023-08-14 16:07:53 -0700 27596 execution.flow INFO Executing node fetch_text_content_from_url. node run id: dbc40f1b-fbfd-476f-956e-4b4ff50ded8a_fetch_text_content_from_url_0 +2023-08-14 16:07:54 -0700 27596 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-14 16:07:54 -0700 27596 execution.flow INFO Executing node summarize_text_content. node run id: dbc40f1b-fbfd-476f-956e-4b4ff50ded8a_summarize_text_content_0 +2023-08-14 16:07:54 -0700 27596 execution WARNING [summarize_text_content in line 0] stderr> Exception occurs: APIConnectionError: Error communicating with OpenAI: Invalid URL 'eastus.api.cognitive.microsoft.com//openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://eastus.api.cognitive.microsoft.com//openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? +2023-08-14 16:07:54 -0700 27596 execution ERROR Node summarize_text_content in line 0 failed. Exception: OpenAI API hits APIConnectionError: Error communicating with OpenAI: Invalid URL 'eastus.api.cognitive.microsoft.com//openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://eastus.api.cognitive.microsoft.com//openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]. +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 596, in request_raw + result = _thread_context.session.request( + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\sessions.py", line 575, in request + prep = self.prepare_request(req) + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\sessions.py", line 486, in prepare_request + p.prepare( + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\models.py", line 368, in prepare + self.prepare_url(url, params) + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\models.py", line 439, in prepare_url + raise MissingSchema( +requests.exceptions.MissingSchema: Invalid URL 'eastus.api.cognitive.microsoft.com//openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://eastus.api.cognitive.microsoft.com//openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 156, in wrapper + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\aoai.py", line 152, in chat + completion = openai.ChatCompletion.create(**{**self._connection_dict, **params}) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 91, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 45, in wrapped_method + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create + return super().create(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create + response, _, api_key = requestor.request( + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 288, in request + result = self.request_raw( + ^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 609, in request_raw + raise error.APIConnectionError( +openai.error.APIConnectionError: Error communicating with OpenAI: Invalid URL 'eastus.api.cognitive.microsoft.com//openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://eastus.api.cognitive.microsoft.com//openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 114, in invoke_tool_with_cache + result = self.invoke_tool(f, args, kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 158, in invoke_tool + raise e + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 152, in invoke_tool + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 171, in wrapper + raise WrappedOpenAIError(e) +promptflow.tools.exception.WrappedOpenAIError: OpenAI API hits APIConnectionError: Error communicating with OpenAI: Invalid URL 'eastus.api.cognitive.microsoft.com//openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://eastus.api.cognitive.microsoft.com//openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors] +2023-08-14 16:08:12 -0700 6716 execution.flow INFO Executing node fetch_text_content_from_url. node run id: a5ab7b77-bdfa-45c6-9dff-e3c76727080f_fetch_text_content_from_url_0 +2023-08-14 16:08:13 -0700 6716 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-14 16:08:13 -0700 6716 execution.flow INFO Executing node summarize_text_content. node run id: a5ab7b77-bdfa-45c6-9dff-e3c76727080f_summarize_text_content_0 +2023-08-14 16:08:13 -0700 6716 execution WARNING [summarize_text_content in line 0] stderr> Exception occurs: APIConnectionError: Error communicating with OpenAI: Invalid URL 'eastus.api.cognitive.microsoft.com/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://eastus.api.cognitive.microsoft.com/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? +2023-08-14 16:08:13 -0700 6716 execution ERROR Node summarize_text_content in line 0 failed. Exception: OpenAI API hits APIConnectionError: Error communicating with OpenAI: Invalid URL 'eastus.api.cognitive.microsoft.com/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://eastus.api.cognitive.microsoft.com/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]. +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 596, in request_raw + result = _thread_context.session.request( + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\sessions.py", line 575, in request + prep = self.prepare_request(req) + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\sessions.py", line 486, in prepare_request + p.prepare( + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\models.py", line 368, in prepare + self.prepare_url(url, params) + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\requests\models.py", line 439, in prepare_url + raise MissingSchema( +requests.exceptions.MissingSchema: Invalid URL 'eastus.api.cognitive.microsoft.com/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://eastus.api.cognitive.microsoft.com/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? + +The above exception was the direct cause of the following exception: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 156, in wrapper + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\aoai.py", line 152, in chat + completion = openai.ChatCompletion.create(**{**self._connection_dict, **params}) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 91, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 45, in wrapped_method + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create + return super().create(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create + response, _, api_key = requestor.request( + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 288, in request + result = self.request_raw( + ^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 609, in request_raw + raise error.APIConnectionError( +openai.error.APIConnectionError: Error communicating with OpenAI: Invalid URL 'eastus.api.cognitive.microsoft.com/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://eastus.api.cognitive.microsoft.com/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 114, in invoke_tool_with_cache + result = self.invoke_tool(f, args, kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 158, in invoke_tool + raise e + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 152, in invoke_tool + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 171, in wrapper + raise WrappedOpenAIError(e) +promptflow.tools.exception.WrappedOpenAIError: OpenAI API hits APIConnectionError: Error communicating with OpenAI: Invalid URL 'eastus.api.cognitive.microsoft.com/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview': No scheme supplied. Perhaps you meant https://eastus.api.cognitive.microsoft.com/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview? [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors] +2023-08-14 16:08:49 -0700 19036 execution.flow INFO Executing node fetch_text_content_from_url. node run id: 642337f0-f9d7-4c97-91cc-67210a11180e_fetch_text_content_from_url_0 +2023-08-14 16:08:50 -0700 19036 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-14 16:08:50 -0700 19036 execution.flow INFO Executing node summarize_text_content. node run id: 642337f0-f9d7-4c97-91cc-67210a11180e_summarize_text_content_0 +2023-08-14 16:08:51 -0700 19036 execution WARNING [summarize_text_content in line 0] stderr> Exception occurs: InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. +2023-08-14 16:08:51 -0700 19036 execution ERROR Node summarize_text_content in line 0 failed. Exception: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]. +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 156, in wrapper + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\aoai.py", line 152, in chat + completion = openai.ChatCompletion.create(**{**self._connection_dict, **params}) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 91, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 45, in wrapped_method + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create + return super().create(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create + response, _, api_key = requestor.request( + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 298, in request + resp, got_stream = self._interpret_response(result, stream) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 700, in _interpret_response + self._interpret_response_line( + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 763, in _interpret_response_line + raise self.handle_error_response( +openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 114, in invoke_tool_with_cache + result = self.invoke_tool(f, args, kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 158, in invoke_tool + raise e + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 152, in invoke_tool + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 197, in wrapper + raise WrappedOpenAIError(e) +promptflow.tools.exception.WrappedOpenAIError: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors] +2023-08-14 17:25:17 -0700 7732 execution.flow INFO Executing node fetch_text_content_from_url. node run id: 3f5b869d-61ca-4686-a14d-6e9a58dc719e_fetch_text_content_from_url_0 +2023-08-14 17:25:18 -0700 7732 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-14 17:25:18 -0700 7732 execution.flow INFO Executing node summarize_text_content. node run id: 3f5b869d-61ca-4686-a14d-6e9a58dc719e_summarize_text_content_0 +2023-08-14 17:25:19 -0700 7732 execution WARNING [summarize_text_content in line 0] stderr> Exception occurs: InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. +2023-08-14 17:25:19 -0700 7732 execution ERROR Node summarize_text_content in line 0 failed. Exception: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]. +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 156, in wrapper + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\aoai.py", line 152, in chat + completion = openai.ChatCompletion.create(**{**self._connection_dict, **params}) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 91, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 45, in wrapped_method + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create + return super().create(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create + response, _, api_key = requestor.request( + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 298, in request + resp, got_stream = self._interpret_response(result, stream) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 700, in _interpret_response + self._interpret_response_line( + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 763, in _interpret_response_line + raise self.handle_error_response( +openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 114, in invoke_tool_with_cache + result = self.invoke_tool(f, args, kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 158, in invoke_tool + raise e + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 152, in invoke_tool + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 197, in wrapper + raise WrappedOpenAIError(e) +promptflow.tools.exception.WrappedOpenAIError: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors] +2023-08-14 17:30:04 -0700 15416 execution.flow INFO Executing node fetch_text_content_from_url. node run id: 314fe203-ed15-48e0-be4c-44bc073816e6_fetch_text_content_from_url_0 +2023-08-14 17:30:05 -0700 15416 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-14 17:30:05 -0700 15416 execution.flow INFO Executing node summarize_text_content. node run id: 314fe203-ed15-48e0-be4c-44bc073816e6_summarize_text_content_0 +2023-08-14 17:30:06 -0700 15416 execution WARNING [summarize_text_content in line 0] stderr> Exception occurs: InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. +2023-08-14 17:30:06 -0700 15416 execution ERROR Node summarize_text_content in line 0 failed. Exception: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]. +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 156, in wrapper + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\aoai.py", line 152, in chat + completion = openai.ChatCompletion.create(**{**self._connection_dict, **params}) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 91, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 45, in wrapped_method + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create + return super().create(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create + response, _, api_key = requestor.request( + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 298, in request + resp, got_stream = self._interpret_response(result, stream) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 700, in _interpret_response + self._interpret_response_line( + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 763, in _interpret_response_line + raise self.handle_error_response( +openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 114, in invoke_tool_with_cache + result = self.invoke_tool(f, args, kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 158, in invoke_tool + raise e + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 152, in invoke_tool + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 197, in wrapper + raise WrappedOpenAIError(e) +promptflow.tools.exception.WrappedOpenAIError: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors] +2023-08-15 11:10:40 -0700 34124 execution.flow INFO Executing node fetch_text_content_from_url. node run id: 8b661200-25c7-4774-a36f-955a9f4c09fe_fetch_text_content_from_url_0 +2023-08-15 11:10:42 -0700 34124 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-15 11:10:42 -0700 34124 execution.flow INFO Executing node summarize_text_content. node run id: 8b661200-25c7-4774-a36f-955a9f4c09fe_summarize_text_content_0 +2023-08-15 11:10:43 -0700 34124 execution WARNING [summarize_text_content in line 0] stderr> Exception occurs: InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. +2023-08-15 11:10:43 -0700 34124 execution ERROR Node summarize_text_content in line 0 failed. Exception: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]. +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 156, in wrapper + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\aoai.py", line 152, in chat + completion = openai.ChatCompletion.create(**{**self._connection_dict, **params}) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 91, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 45, in wrapped_method + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create + return super().create(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create + response, _, api_key = requestor.request( + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 298, in request + resp, got_stream = self._interpret_response(result, stream) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 700, in _interpret_response + self._interpret_response_line( + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 763, in _interpret_response_line + raise self.handle_error_response( +openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 114, in invoke_tool_with_cache + result = self.invoke_tool(f, args, kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 158, in invoke_tool + raise e + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 152, in invoke_tool + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 197, in wrapper + raise WrappedOpenAIError(e) +promptflow.tools.exception.WrappedOpenAIError: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors] +2023-08-15 11:18:50 -0700 26044 execution.flow INFO Executing node fetch_text_content_from_url. node run id: bb31bf01-d635-4309-a8c0-9cb2073d659b_fetch_text_content_from_url_0 +2023-08-15 11:18:51 -0700 26044 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-15 11:18:51 -0700 26044 execution.flow INFO Executing node summarize_text_content. node run id: bb31bf01-d635-4309-a8c0-9cb2073d659b_summarize_text_content_0 +2023-08-15 11:18:53 -0700 26044 execution WARNING [summarize_text_content in line 0] stderr> Exception occurs: InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. +2023-08-15 11:18:53 -0700 26044 execution ERROR Node summarize_text_content in line 0 failed. Exception: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]. +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 156, in wrapper + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\aoai.py", line 152, in chat + completion = openai.ChatCompletion.create(**{**self._connection_dict, **params}) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 91, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 45, in wrapped_method + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create + return super().create(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create + response, _, api_key = requestor.request( + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 298, in request + resp, got_stream = self._interpret_response(result, stream) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 700, in _interpret_response + self._interpret_response_line( + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 763, in _interpret_response_line + raise self.handle_error_response( +openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 114, in invoke_tool_with_cache + result = self.invoke_tool(f, args, kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 158, in invoke_tool + raise e + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 152, in invoke_tool + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 197, in wrapper + raise WrappedOpenAIError(e) +promptflow.tools.exception.WrappedOpenAIError: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors] +2023-08-15 11:19:05 -0700 33940 execution.flow INFO Executing node fetch_text_content_from_url. node run id: 85655edb-64aa-42fa-a51b-c341de5cad81_fetch_text_content_from_url_0 +2023-08-15 11:19:06 -0700 33940 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-15 11:19:06 -0700 33940 execution.flow INFO Executing node summarize_text_content. node run id: 85655edb-64aa-42fa-a51b-c341de5cad81_summarize_text_content_0 +2023-08-15 11:19:08 -0700 33940 execution WARNING [summarize_text_content in line 0] stderr> Exception occurs: InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. +2023-08-15 11:19:08 -0700 33940 execution ERROR Node summarize_text_content in line 0 failed. Exception: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]. +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 156, in wrapper + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\aoai.py", line 152, in chat + completion = openai.ChatCompletion.create(**{**self._connection_dict, **params}) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 91, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 45, in wrapped_method + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create + return super().create(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create + response, _, api_key = requestor.request( + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 298, in request + resp, got_stream = self._interpret_response(result, stream) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 700, in _interpret_response + self._interpret_response_line( + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 763, in _interpret_response_line + raise self.handle_error_response( +openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 114, in invoke_tool_with_cache + result = self.invoke_tool(f, args, kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 158, in invoke_tool + raise e + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 152, in invoke_tool + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 197, in wrapper + raise WrappedOpenAIError(e) +promptflow.tools.exception.WrappedOpenAIError: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors] +2023-08-15 18:18:14 -0700 11968 execution.flow INFO Executing node fetch_text_content_from_url. node run id: f37d404c-435c-48c3-8d4a-c426d52279b7_fetch_text_content_from_url_0 +2023-08-15 18:18:20 -0700 11968 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-15 18:18:20 -0700 11968 execution.flow INFO Executing node summarize_text_content. node run id: f37d404c-435c-48c3-8d4a-c426d52279b7_summarize_text_content_0 +2023-08-15 18:18:25 -0700 11968 execution WARNING [summarize_text_content in line 0] stderr> Exception occurs: InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. +2023-08-15 18:18:25 -0700 11968 execution ERROR Node summarize_text_content in line 0 failed. Exception: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]. +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 156, in wrapper + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\aoai.py", line 152, in chat + completion = openai.ChatCompletion.create(**{**self._connection_dict, **params}) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 91, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 45, in wrapped_method + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create + return super().create(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create + response, _, api_key = requestor.request( + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 298, in request + resp, got_stream = self._interpret_response(result, stream) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 700, in _interpret_response + self._interpret_response_line( + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 763, in _interpret_response_line + raise self.handle_error_response( +openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 114, in invoke_tool_with_cache + result = self.invoke_tool(f, args, kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 158, in invoke_tool + raise e + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 152, in invoke_tool + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 197, in wrapper + raise WrappedOpenAIError(e) +promptflow.tools.exception.WrappedOpenAIError: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors] +2023-08-15 18:21:34 -0700 3432 execution.flow INFO Executing node fetch_text_content_from_url. node run id: ce2e1573-e757-46c0-b9a9-e1f571b4b430_fetch_text_content_from_url_0 +2023-08-15 18:21:40 -0700 3432 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-15 18:21:40 -0700 3432 execution.flow INFO Executing node summarize_text_content. node run id: ce2e1573-e757-46c0-b9a9-e1f571b4b430_summarize_text_content_0 +2023-08-15 18:21:46 -0700 3432 execution WARNING [summarize_text_content in line 0] stderr> Exception occurs: InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. +2023-08-15 18:21:46 -0700 3432 execution ERROR Node summarize_text_content in line 0 failed. Exception: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]. +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 156, in wrapper + return func(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\aoai.py", line 152, in chat + completion = openai.ChatCompletion.create(**{**self._connection_dict, **params}) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 91, in wrapper + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\openai_injector.py", line 45, in wrapped_method + result = f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create + return super().create(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create + response, _, api_key = requestor.request( + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 298, in request + resp, got_stream = self._interpret_response(result, stream) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 700, in _interpret_response + self._interpret_response_line( + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\openai\api_requestor.py", line 763, in _interpret_response_line + raise self.handle_error_response( +openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 114, in invoke_tool_with_cache + result = self.invoke_tool(f, args, kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 158, in invoke_tool + raise e + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\_core\flow_execution_context.py", line 152, in invoke_tool + return f(*args, **kwargs) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\osomorog.REDMOND\.conda\envs\pf_code\Lib\site-packages\promptflow\tools\common.py", line 197, in wrapper + raise WrappedOpenAIError(e) +promptflow.tools.exception.WrappedOpenAIError: OpenAI API hits InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors] +2023-08-15 18:28:15 -0700 21036 execution.flow INFO Executing node fetch_text_content_from_url. node run id: 6f02f4b3-6822-4a33-8b55-c32aad105283_fetch_text_content_from_url_0 +2023-08-15 18:28:21 -0700 21036 execution.flow INFO Node fetch_text_content_from_url completes. +2023-08-15 18:28:21 -0700 21036 execution.flow INFO Executing node summarize_text_content. node run id: 6f02f4b3-6822-4a33-8b55-c32aad105283_summarize_text_content_0 +2023-08-15 18:28:30 -0700 21036 execution.flow INFO Node summarize_text_content completes. +2023-08-15 18:28:30 -0700 21036 execution.flow INFO Executing node prepare_examples. node run id: 6f02f4b3-6822-4a33-8b55-c32aad105283_prepare_examples_0 +2023-08-15 18:28:31 -0700 21036 execution.flow INFO Node prepare_examples completes. +2023-08-15 18:28:31 -0700 21036 execution.flow INFO Executing node classify_with_llm. node run id: 6f02f4b3-6822-4a33-8b55-c32aad105283_classify_with_llm_0 +2023-08-15 18:28:32 -0700 21036 execution.flow INFO Node classify_with_llm completes. +2023-08-15 18:28:32 -0700 21036 execution.flow INFO Executing node convert_to_dict. node run id: 6f02f4b3-6822-4a33-8b55-c32aad105283_convert_to_dict_0 +2023-08-15 18:28:33 -0700 21036 execution.flow INFO Node convert_to_dict completes. diff --git a/promptflow/web-classification/.promptflow/flow.tools.json b/promptflow/web-classification/.promptflow/flow.tools.json new file mode 100644 index 0000000..1b50584 --- /dev/null +++ b/promptflow/web-classification/.promptflow/flow.tools.json @@ -0,0 +1,77 @@ +{ + "package": {}, + "code": { + "fetch_text_content_from_url.py": { + "type": "python", + "inputs": { + "url": { + "type": [ + "string" + ] + } + }, + "source": "fetch_text_content_from_url.py", + "function": "fetch_text_content_from_url" + }, + "summarize_text_content.jinja2": { + "type": "llm", + "inputs": { + "text": { + "type": [ + "string" + ] + } + }, + "source": "summarize_text_content.jinja2" + }, + "summarize_text_content__variant_1.jinja2": { + "type": "llm", + "inputs": { + "text": { + "type": [ + "string" + ] + } + }, + "source": "summarize_text_content__variant_1.jinja2" + }, + "prepare_examples.py": { + "type": "python", + "source": "prepare_examples.py", + "function": "prepare_examples" + }, + "classify_with_llm.jinja2": { + "type": "llm", + "inputs": { + "url": { + "type": [ + "string" + ] + }, + "examples": { + "type": [ + "string" + ] + }, + "text_content": { + "type": [ + "string" + ] + } + }, + "source": "classify_with_llm.jinja2" + }, + "convert_to_dict.py": { + "type": "python", + "inputs": { + "input_str": { + "type": [ + "string" + ] + } + }, + "source": "convert_to_dict.py", + "function": "convert_to_dict" + } + } +} \ No newline at end of file diff --git a/promptflow/web-classification/__pycache__/convert_to_dict.cpython-311.pyc b/promptflow/web-classification/__pycache__/convert_to_dict.cpython-311.pyc new file mode 100644 index 0000000..64cad8a Binary files /dev/null and b/promptflow/web-classification/__pycache__/convert_to_dict.cpython-311.pyc differ diff --git a/promptflow/web-classification/__pycache__/fetch_text_content_from_url.cpython-311.pyc b/promptflow/web-classification/__pycache__/fetch_text_content_from_url.cpython-311.pyc new file mode 100644 index 0000000..915b554 Binary files /dev/null and b/promptflow/web-classification/__pycache__/fetch_text_content_from_url.cpython-311.pyc differ diff --git a/promptflow/web-classification/__pycache__/prepare_examples.cpython-311.pyc b/promptflow/web-classification/__pycache__/prepare_examples.cpython-311.pyc new file mode 100644 index 0000000..94ae9dc Binary files /dev/null and b/promptflow/web-classification/__pycache__/prepare_examples.cpython-311.pyc differ diff --git a/promptflow/web-classification/classify_with_llm.jinja2 b/promptflow/web-classification/classify_with_llm.jinja2 new file mode 100644 index 0000000..6d7c3da --- /dev/null +++ b/promptflow/web-classification/classify_with_llm.jinja2 @@ -0,0 +1,21 @@ +system: +Your task is to classify a given url into one of the following categories: +Movie, App, Academic, Channel, Profile, PDF or None based on the text content information. +The classification will be based on the url, the webpage text content summary, or both. + +user: +The selection range of the value of "category" must be within "Movie", "App", "Academic", "Channel", "Profile", "PDF" and "None". +The selection range of the value of "evidence" must be within "Url", "Text content", and "Both". +Here are a few examples: +{% for ex in examples %} +URL: {{ex.url}} +Text content: {{ex.text_content}} +OUTPUT: +{"category": "{{ex.category}}", "evidence": "{{ex.evidence}}"} + +{% endfor %} + +For a given URL and text content, classify the url to complete the category and indicate evidence: +URL: {{url}} +Text content: {{text_content}}. +OUTPUT: \ No newline at end of file diff --git a/promptflow/web-classification/convert_to_dict.py b/promptflow/web-classification/convert_to_dict.py new file mode 100644 index 0000000..3b287df --- /dev/null +++ b/promptflow/web-classification/convert_to_dict.py @@ -0,0 +1,12 @@ +import json + +from promptflow import tool + + +@tool +def convert_to_dict(input_str: str): + try: + return json.loads(input_str) + except Exception as e: + print("input is not valid, error: {}".format(e)) + return {"category": "None", "evidence": "None"} diff --git a/promptflow/web-classification/data.jsonl b/promptflow/web-classification/data.jsonl new file mode 100644 index 0000000..248b61c --- /dev/null +++ b/promptflow/web-classification/data.jsonl @@ -0,0 +1,3 @@ +{"url": "https://www.youtube.com/watch?v=kYqRtjDBci8", "answer": "Channel", "evidence": "Both"} +{"url": "https://arxiv.org/abs/2307.04767", "answer": "Academic", "evidence": "Both"} +{"url": "https://play.google.com/store/apps/details?id=com.twitter.android", "answer": "App", "evidence": "Both"} diff --git a/promptflow/web-classification/fetch_text_content_from_url.py b/promptflow/web-classification/fetch_text_content_from_url.py new file mode 100644 index 0000000..1ff7f79 --- /dev/null +++ b/promptflow/web-classification/fetch_text_content_from_url.py @@ -0,0 +1,30 @@ +import bs4 +import requests + +from promptflow import tool + + +@tool +def fetch_text_content_from_url(url: str): + # Send a request to the URL + try: + headers = { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.35" + } + response = requests.get(url, headers=headers) + if response.status_code == 200: + # Parse the HTML content using BeautifulSoup + soup = bs4.BeautifulSoup(response.text, "html.parser") + soup.prettify() + return soup.get_text()[:2000] + else: + msg = ( + f"Get url failed with status code {response.status_code}.\nURL: {url}\nResponse: " + f"{response.text[:100]}" + ) + print(msg) + return "No available content" + except Exception as e: + print("Get url failed with error: {}".format(e)) + return "No available content" diff --git a/promptflow/web-classification/flow.dag.yaml b/promptflow/web-classification/flow.dag.yaml new file mode 100644 index 0000000..04f8638 --- /dev/null +++ b/promptflow/web-classification/flow.dag.yaml @@ -0,0 +1,61 @@ +inputs: + url: + type: string + default: https://play.google.com/store/apps/details?id=com.twitter.android +outputs: + category: + type: string + reference: ${convert_to_dict.output.category} + evidence: + type: string + reference: ${convert_to_dict.output.evidence} +nodes: +- name: fetch_text_content_from_url + type: python + source: + type: code + path: fetch_text_content_from_url.py + inputs: + url: ${inputs.url} +- name: summarize_text_content + type: llm + source: + type: code + path: summarize_text_content.jinja2 + inputs: + deployment_name: gpt-35-turbo-0301 + max_tokens: 128 + temperature: 0.2 + text: ${fetch_text_content_from_url.output} + provider: AzureOpenAI + connection: Default_AzureOpenAI + api: chat + module: promptflow.tools.aoai +- name: prepare_examples + type: python + source: + type: code + path: prepare_examples.py + inputs: {} +- name: classify_with_llm + type: llm + source: + type: code + path: classify_with_llm.jinja2 + inputs: + deployment_name: gpt-35-turbo-0301 + max_tokens: 128 + temperature: 0.2 + url: ${inputs.url} + text_content: ${summarize_text_content.output} + examples: ${prepare_examples.output} + provider: AzureOpenAI + connection: Default_AzureOpenAI + api: chat +- name: convert_to_dict + type: python + source: + type: code + path: convert_to_dict.py + inputs: + input_str: ${classify_with_llm.output} diff --git a/promptflow/web-classification/prepare_examples.py b/promptflow/web-classification/prepare_examples.py new file mode 100644 index 0000000..0f8cf7d --- /dev/null +++ b/promptflow/web-classification/prepare_examples.py @@ -0,0 +1,44 @@ +from promptflow import tool + + +@tool +def prepare_examples(): + return [ + { + "url": "https://play.google.com/store/apps/details?id=com.spotify.music", + "text_content": "Spotify is a free music and podcast streaming app with millions of songs, albums, and " + "original podcasts. It also offers audiobooks, so users can enjoy thousands of stories. " + "It has a variety of features such as creating and sharing music playlists, discovering " + "new music, and listening to popular and exclusive podcasts. It also has a Premium " + "subscription option which allows users to download and listen offline, and access " + "ad-free music. It is available on all devices and has a variety of genres and artists " + "to choose from.", + "category": "App", + "evidence": "Both", + }, + { + "url": "https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw", + "text_content": "NFL Sunday Ticket is a service offered by Google LLC that allows users to watch NFL " + "games on YouTube. It is available in 2023 and is subject to the terms and privacy policy " + "of Google LLC. It is also subject to YouTube's terms of use and any applicable laws.", + "category": "Channel", + "evidence": "URL", + }, + { + "url": "https://arxiv.org/abs/2303.04671", + "text_content": "Visual ChatGPT is a system that enables users to interact with ChatGPT by sending and test" + "receiving not only languages but also images, providing complex visual questions or " + "visual editing instructions, and providing feedback and asking for corrected results. " + "It incorporates different Visual Foundation Models and is publicly available. Experiments " + "show that Visual ChatGPT opens the door to investigating the visual roles of ChatGPT with " + "the help of Visual Foundation Models.", + "category": "Academic", + "evidence": "Text content", + }, + { + "url": "https://ab.politiaromana.ro/", + "text_content": "There is no content available for this text.", + "category": "None", + "evidence": "None", + }, + ] diff --git a/promptflow/web-classification/requirements.txt b/promptflow/web-classification/requirements.txt new file mode 100644 index 0000000..9e5b3b3 --- /dev/null +++ b/promptflow/web-classification/requirements.txt @@ -0,0 +1,4 @@ +--extra-index-url https://azuremlsdktestpypi.azureedge.net/promptflow/ +promptflow[azure] +promptflow-tools +bs4 \ No newline at end of file diff --git a/promptflow/web-classification/run_evaluation.yml b/promptflow/web-classification/run_evaluation.yml new file mode 100644 index 0000000..d551f19 --- /dev/null +++ b/promptflow/web-classification/run_evaluation.yml @@ -0,0 +1,18 @@ +$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Run.schema.json +flow: ../evaluation/classification-accuracy-eval +data: data.jsonl +run: web_classification_variant_1_20230816_215600_605116 # replace with your run name +column_mapping: + groundtruth: ${data.answer} + prediction: ${run.outputs.category} + +# define cloud resource +runtime: + +connections: + classify_with_llm: + connection: Default_AzureOpenAI + deployment_name: gpt-35-turbo-0301 + summarize_text_content: + connection: Default_AzureOpenAI + deployment_name: gpt-35-turbo-0301 \ No newline at end of file diff --git a/promptflow/web-classification/summarize_text_content.jinja2 b/promptflow/web-classification/summarize_text_content.jinja2 new file mode 100644 index 0000000..8107801 --- /dev/null +++ b/promptflow/web-classification/summarize_text_content.jinja2 @@ -0,0 +1,7 @@ +system: +Please summarize the following text in one paragraph. 100 words. +Do not add any information that is not in the text. + +user: +Text: {{text}} +Summary: \ No newline at end of file diff --git a/promptflow/web-classification/summarize_text_content__variant_1.jinja2 b/promptflow/web-classification/summarize_text_content__variant_1.jinja2 new file mode 100644 index 0000000..5fb8160 --- /dev/null +++ b/promptflow/web-classification/summarize_text_content__variant_1.jinja2 @@ -0,0 +1,7 @@ +system: +Please summarize some keywords of this paragraph and have some details of each keywords. +Do not add any information that is not in the text. + +user: +Text: {{text}} +Summary: \ No newline at end of file