repo_id stringlengths 15 132 | file_path stringlengths 34 176 | content stringlengths 2 3.52M | __index_level_0__ int64 0 0 |
|---|---|---|---|
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/chat_flow | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/chat_flow/template/azure_openai.yaml.jinja2 | $schema: https://azuremlschemas.azureedge.net/promptflow/latest/AzureOpenAIConnection.schema.json
name: {{ connection }}
type: azure_open_ai
api_key: "<user-input>"
api_base: "<user-input>"
api_type: "azure"
| 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/package_tool/README.md.jinja2 | The directory structure in the package tool is as follows:
```python
{{ package_name }}
│ setup.py # This file contains metadata about your project like the name, version.
│
│ MANIFEST.in # This file is used to determine which files to include in the distribution of the project.
│
└───{{ ... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/package_tool/init.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
| 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/package_tool/utils.py.jinja2 | from pathlib import Path
import importlib.util
from promptflow import PFClient
package_name = "{{ package_name }}"
def list_package_tools(raise_error=False):
"""
List the meta of all tools in the package.
The key of meta dict is the module name of tools and value is the meta data of the tool.
"""
... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/package_tool/setup.py.jinja2 | from setuptools import find_packages, setup
PACKAGE_NAME = "{{ package_name }}"
setup(
name=PACKAGE_NAME,
version="0.0.1",
description="This is my tools package",
packages=find_packages(),
entry_points={
"package_tools": ["{{ package_name }} = {{ package_name }}.utils:list_package_tools"],... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/package_tool/tool.py.jinja2 | {% if icon %}
from pathlib import Path
{% endif %}
from promptflow import tool
from promptflow.connections import CustomConnection
@tool(
name="{{ tool_name }}",
description="This is {{ tool_name }} tool",
{% if icon %}
icon={{ icon }},
{% endif %}
{% for key, value in extra_info.items() %}
{{ key }}... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/entry_flow/flow.dag.yaml.jinja2 | $schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json
inputs:
{% for arg, typ in flow_inputs.items() %}
{{ arg }}:
type: {{ typ }}
{% endfor %}
outputs:
output:
type: string
reference: {% raw %}${{% endraw %}{{ main_node_name }}.output}
nodes:
{% for param_name, file in promp... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/entry_flow/requirements_txt | promptflow | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/entry_flow/flow.tools.json.jinja2 | {
"package": {},
"code": {
{% for key, prompt_obj in prompt_params.items() %}
"{{ key }}": {
"type": "prompt",
"inputs": {
{% for input_name, value in prompt_obj.get("inputs", {}).items() %}
"{{ input_name }}": {
"type": [
... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/entry_flow/tool.py.jinja2 | import os
from promptflow import tool
from promptflow.connections import CustomConnection
{{ function_import }}
@tool
def {{ tool_function }}(
{% for arg in tool_arg_list %}
{{ arg.name }},
{% endfor %}
connection: CustomConnection) -> str:
# set environment variables
for key, value in dict(connect... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/entry_flow/gitignore | .env
__pycache__/
.promptflow/*
!.promptflow/flow.tools.json
.runs/
| 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/evaluation_flow/data.jsonl | {"groundtruth": "App", "prediction": "App"}
| 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/evaluation_flow/line_process.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from promptflow import tool
@tool
def line_process(groundtruth: str, prediction: str):
"""
This tool processes the prediction of ... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/evaluation_flow/aggregate.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from typing import List
from promptflow import log_metric, tool
@tool
def aggregate(processed_results: List[str]):
"""
This tool... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/evaluation_flow/flow.dag.yaml | $schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json
inputs:
groundtruth:
type: string
prediction:
type: string
outputs:
results:
type: string
reference: ${line_process.output}
nodes:
- name: line_process
type: python
source:
type: code
path: line_process.py... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/evaluation_flow | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/evaluation_flow/.promptflow/flow.tools.json | {
"package": {},
"code": {
"line_process.py": {
"type": "python",
"inputs": {
"groundtruth": {
"type": [
"string"
]
},
"prediction": {
"type": [
"string"
]
}
},
"function": "line_process"
... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/standard_flow/hello.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from promptflow import tool
# The inputs section will change based on the arguments of the tool function, after you save the code
# Adding... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/standard_flow/data.jsonl | {"text": "Hello World!"}
| 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/standard_flow/hello.jinja2 | {# Please replace the template with your own prompt. #}
Write a simple {{text}} program that displays the greeting message when executed.
| 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/standard_flow/flow.dag.yaml | $schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json
inputs:
text:
type: string
outputs:
output_prompt:
type: string
reference: ${echo_my_prompt.output}
nodes:
- name: hello_prompt
type: prompt
source:
type: code
path: hello.jinja2
inputs:
text: ${inputs.tex... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/standard_flow | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/data/standard_flow/.promptflow/flow.tools.json | {
"package": {},
"code": {
"hello.jinja2": {
"type": "prompt",
"inputs": {
"text": {
"type": [
"string"
]
}
}
},
"hello.py": {
"type": "python",... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf/_upgrade.py | import os
from promptflow._cli._params import (
add_param_yes,
base_params,
)
from promptflow._cli._utils import activate_action, get_cli_sdk_logger
from promptflow._utils.utils import prompt_y_n
from promptflow.exceptions import UserErrorException
logger = get_cli_sdk_logger()
UPGRADE_MSG = 'Not able to upgr... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf/_experiment.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import argparse
import json
from promptflow._cli._params import (
add_param_all_results,
add_param_archived_only,
add_param_inc... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf/_init_entry_generators.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import inspect
import json
import shutil
from abc import ABC, abstractmethod
from ast import literal_eval
from enum import Enum
from pathli... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf/_run.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import argparse
import json
from typing import Callable, Dict, List, Optional, Tuple
from promptflow._cli._params import (
add_param_a... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf/entry.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
# pylint: disable=wrong-import-position
import json
import time
from promptflow._cli._pf._experiment import add_experiment_parser, dispatch... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf/_config.py | import argparse
import json
from promptflow._cli._params import add_param_set_positional, base_params
from promptflow._cli._utils import activate_action, list_of_dict_to_dict
from promptflow._sdk._configuration import Configuration, InvalidConfigValue
from promptflow._sdk._utils import print_red_error
from promptflow.... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf/_tool.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import argparse
import json
import re
import shutil
from pathlib import Path
from promptflow._cli._params import add_param_set_tool_extra_... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf/_connection.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import argparse
import json
from functools import partial
from promptflow._cli._params import (
add_param_all_results,
add_param_m... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf/_flow.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import argparse
import importlib
import json
import os
import shutil
import subprocess
import sys
import tempfile
import webbrowser
from pa... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf/help.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from promptflow._sdk._configuration import Configuration
# This logic is copied from: https://github.com/microsoft/knack/blob/dev/knack/hel... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf/__init__.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
| 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf_azure/_utils.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from promptflow._cli._utils import get_client_for_cli
from promptflow.azure import PFClient
def _get_azure_pf_client(subscription_id, reso... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf_azure/_run.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import argparse
import functools
import json
from typing import Dict, List, Optional
from promptflow._cli._params import (
add_param_a... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf_azure/entry.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
# pylint: disable=wrong-import-position
import json
import time
from promptflow._cli._pf.help import show_privacy_statement, show_welcome_m... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf_azure/_connection.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from pathlib import Path
from dotenv import dotenv_values
from promptflow._cli._params import add_param_connection_name, add_param_env, b... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf_azure/_flow.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import argparse
import json
from typing import Dict, List
from promptflow._cli._params import (
add_param_archived_only,
add_param_... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/_cli | promptflow_repo/promptflow/src/promptflow/promptflow/_cli/_pf_azure/__init__.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
| 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/storage/_errors.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
class DuplicatedPrimaryKeyException(Exception):
pass
class NotFoundException(Exception):
pass
| 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/storage/_cache_storage.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from dataclasses import dataclass
from datetime import datetime
from promptflow.contracts.run_info import RunInfo
@dataclass
class Cache... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/storage/run_records.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import json
from dataclasses import asdict, dataclass
from datetime import datetime
from promptflow._utils.dataclass_serializer import ser... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/storage/_run_storage.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from functools import partial
from pathlib import Path
from typing import Union
from promptflow._utils.multimedia_utils import _process_re... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/storage/__init__.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from ._cache_storage import AbstractCacheStorage # noqa: F401
from ._run_storage import AbstractRunStorage # noqa: F401
__all__ = ["Abst... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_internal/__init__.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
# flake8: noqa
"""Put some imports here for internal pack... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/_errors.py | from traceback import TracebackException
from promptflow._utils.exception_utils import (
ADDITIONAL_INFO_USER_EXECUTION_ERROR,
is_pf_core_frame,
last_frame_info,
remove_suffix,
)
from promptflow.exceptions import ErrorTarget, SystemErrorException, UserErrorException, ValidationException
class Unexpec... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/operation_context.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from contextvars import ContextVar
from typing import Dict, Mapping
from promptflow._version import VERSION
class OperationContext(Dict):... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/token_provider.py | import threading
from abc import ABC, abstractmethod
from promptflow.exceptions import UserErrorException
# to access azure ai services, we need to get the token with this audience
COGNITIVE_AUDIENCE = "https://cognitiveservices.azure.com/"
class TokenProviderABC(ABC):
def __init__(self) -> None:
super(... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/log_manager.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import sys
from contextvars import ContextVar
from datetime import datetime, timezone
from io import StringIO, TextIOBase
from typing impor... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/run_tracker.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import asyncio
import json
from contextvars import ContextVar
from datetime import datetime, timezone
from types import GeneratorType
from ... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/tools_manager.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import importlib
import importlib.util
import inspect
import logging
import traceback
import types
from functools import partial
from pathl... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/tool_meta_generator.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
"""
This file can generate a meta file for the given prompt template or a python file.
"""
import importlib.util
import inspect
import json... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/flow_execution_context.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import asyncio
import functools
import inspect
import logging
import threading
import time
import uuid
from contextvars import ContextVar
f... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/generator_proxy.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
class GeneratorProxy:
"""A proxy for generator that can record all items that have been yielded from the generator."""
def __init... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/cache_manager.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import hashlib
import json
from dataclasses import dataclass
from typing import Callable, List
from promptflow._utils.logger_utils import ... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/tracer.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import functools
import inspect
import json
import logging
import uuid
from collections.abc import Iterator
from contextvars import Context... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/metric_logger.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import inspect
from typing import Callable
class MetricLoggerManager:
_instance = None
def __init__(self):
self._metric... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/tool.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import inspect
import logging
from abc import ABC
from dataclasses import InitVar, asdict, dataclass, field
from enum import Enum
from typi... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/openai_injector.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import asyncio
import functools
import importlib
import inspect
import logging
import os
from datetime import datetime
from importlib.metad... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/thread_local_singleton.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from contextvars import ContextVar
from typing import Type, TypeVar
T = TypeVar("T")
class ThreadLocalSingleton:
# Use context varia... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/connection_manager.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import copy
import json
import os
from dataclasses import fields, is_dataclass
from pathlib import Path
from typing import Any, Dict, List
... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/_core/__init__.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
| 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_pf_client.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import os
from os import PathLike
from typing import Dict, List, Optional, Union
from azure.ai.ml import MLClient
from azure.core.credentia... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_load_functions.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from os import PathLike
from pathlib import Path
from typing import IO, AnyStr, Optional, Union
from ._utils import is_arm_id
def load_fl... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/__init__.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
from ._pf_client import PFClient
__all__ = ["PFClient"]
| 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow_service_caller.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
"""service_caller.py, module for interacting with the AzureML service."""
import json
import os
import sys
import time
import uuid
from func... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/service_caller_factory.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from threading import Lock
from promptflow.azure._restclient.flow_service_caller import FlowServiceCaller
class _FlowServiceCallerFactory... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/swagger.json | {
"openapi": "3.0.1",
"info": {
"title": "Azure Machine Learning Designer Service Client",
"version": "1.0.0"
},
"paths": {
"/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/submit": {
"p... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/README.md | # How to automatically generate the REST client code
Rest client code in this folder are not manually written, but generated by autorest.
## Setup
+ install [nodejs](https://nodejs.org/en)
+ install autorest
+ run `npm install -g autorest`
## Download swagger.json
Download swagger.json from [here](https://int.api.a... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/__init__.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
| 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/py.typed | # Marker file for PEP 561. | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/_azure_machine_learning_designer_service_client.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/_vendor.py | # --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ---------------------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/_configuration.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/_patch.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
# coding=utf-8
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All ri... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/__init__.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_bulk_runs_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_flows_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_connection_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_runtimes_workspace_independent_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_tools_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_sessions_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_sessions_admin_operations.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_flows_provider_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_runs_admin_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_runtimes_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/__init__.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/operations/_connections_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/_azure_machine_learning_designer_service_client.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/_configuration.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/_patch.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
# coding=utf-8
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All ri... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/__init__.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_bulk_runs_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flows_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_connection_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_runtimes_workspace_independent_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_tools_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_sessions_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_sessions_admin_operations.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flows_provider_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio | promptflow_repo/promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_runs_admin_operations.py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ------------------------------... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.