text stringlengths 8 1.72M | id stringlengths 22 143 | metadata dict | __index_level_0__ int64 0 104 |
|---|---|---|---|
# system:
Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.
# user:
{{prev_question}}
# assistant:
{{prev_answer}}
# function:
## name:
{{name}}
## content:
{{result}}
# user:
{{question}}
| promptflow/src/promptflow-tools/tests/test_configs/prompt_templates/prompt_with_function.jinja2/0 | {
"file_path": "promptflow/src/promptflow-tools/tests/test_configs/prompt_templates/prompt_with_function.jinja2",
"repo_id": "promptflow",
"token_count": 82
} | 34 |
# ---------------------------------------------------------
# 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... | promptflow/src/promptflow/promptflow/_cli/_pf/help.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/_pf/help.py",
"repo_id": "promptflow",
"token_count": 563
} | 35 |
{
"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": [
... | promptflow/src/promptflow/promptflow/_cli/data/entry_flow/flow.tools.json.jinja2/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/data/entry_flow/flow.tools.json.jinja2",
"repo_id": "promptflow",
"token_count": 779
} | 36 |
$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... | promptflow/src/promptflow/promptflow/_cli/data/standard_flow/flow.dag.yaml/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_cli/data/standard_flow/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 205
} | 37 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from contextvars import ContextVar
from typing import Type, TypeVar
T = TypeVar("T")
class ThreadLocalSingleton:
# Use context varia... | promptflow/src/promptflow/promptflow/_core/thread_local_singleton.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_core/thread_local_singleton.py",
"repo_id": "promptflow",
"token_count": 370
} | 38 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import time
from functools import partial, wraps
from typing import Tuple, Union
from sqlalchemy.exc import OperationalError
def retry(e... | promptflow/src/promptflow/promptflow/_sdk/_orm/retry.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_orm/retry.py",
"repo_id": "promptflow",
"token_count": 868
} | 39 |
{
"swagger": "2.0",
"basePath": "/v1.0",
"paths": {
"/Connections/": {
"get": {
"responses": {
"403": {
"description": "This service is available for local user only, please specify X-Remote-User in headers."
... | promptflow/src/promptflow/promptflow/_sdk/_service/swagger.json/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_service/swagger.json",
"repo_id": "promptflow",
"token_count": 16309
} | 40 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
class FlowDataCollector:
"""FlowDataCollector is used to collect flow data via MDC for monitoring."""
def __init__(self, logger):
... | promptflow/src/promptflow/promptflow/_sdk/_serving/monitor/data_collector.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_serving/monitor/data_collector.py",
"repo_id": "promptflow",
"token_count": 912
} | 41 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import logging
import os
import platform
import sys
from opencensus.ext.azure.log_exporter import AzureEventHandler
from promptflow._sdk._... | promptflow/src/promptflow/promptflow/_sdk/_telemetry/logging_handler.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/_telemetry/logging_handler.py",
"repo_id": "promptflow",
"token_count": 2042
} | 42 |
#!/bin/bash
echo "$(date -uIns) - promptflow-serve/finish $@"
echo "$(date -uIns) - Stopped all Gunicorn processes" | promptflow/src/promptflow/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/finish.jinja2/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/finish.jinja2",
"repo_id": "promptflow",
"token_count": 45
} | 43 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import abc
import json
from os import PathLike
from pathlib import Path
from typing import Dict, Optional, Tuple, Union
from marshmallow i... | promptflow/src/promptflow/promptflow/_sdk/entities/_flow.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/entities/_flow.py",
"repo_id": "promptflow",
"token_count": 5217
} | 44 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
| promptflow/src/promptflow/promptflow/_sdk/schemas/__init__.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_sdk/schemas/__init__.py",
"repo_id": "promptflow",
"token_count": 54
} | 45 |
from dataclasses import dataclass
from enum import Enum
from typing import Optional
class FeatureState(Enum):
"""The enum of feature state.
READY: The feature is ready to use.
E2ETEST: The feature is not ready to be shipped to customer and is in e2e testing.
"""
READY = "Ready"
E2ETEST = "E2... | promptflow/src/promptflow/promptflow/_utils/feature_utils.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/_utils/feature_utils.py",
"repo_id": "promptflow",
"token_count": 447
} | 46 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from pathlib import Path
RESOURCE_FOLDER = Path(__file__).parent.parent / "resources"
COMMAND_COMPONENT_SPEC_TEMPLATE = RESOURCE_FOLDER / ... | promptflow/src/promptflow/promptflow/azure/_constants/_component.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_constants/_component.py",
"repo_id": "promptflow",
"token_count": 102
} | 47 |
# 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.
# ------------------------------... | promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/_azure_machine_learning_designer_service_client.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_restclient/flow/aio/_azure_machine_learning_designer_service_client.py",
"repo_id": "promptflow",
"token_count": 1947
} | 48 |
# 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.
# ------------------------------... | promptflow/src/promptflow/promptflow/azure/_restclient/flow/models/_azure_machine_learning_designer_service_client_enums.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_restclient/flow/models/_azure_machine_learning_designer_service_client_enums.py",
"repo_id": "promptflow",
"token_count": 22758
} | 49 |
# ---------------------------------------------------------
# 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... | promptflow/src/promptflow/promptflow/azure/_restclient/flow_service_caller.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/_restclient/flow_service_caller.py",
"repo_id": "promptflow",
"token_count": 11276
} | 50 |
$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json
# will be changed to flow to support parallelism
type: command
outputs:
output:
# PRS team will always aggregate all the outputs into a single file under this folder for now
type: uri_folder
| promptflow/src/promptflow/promptflow/azure/resources/component_spec_template.yaml/0 | {
"file_path": "promptflow/src/promptflow/promptflow/azure/resources/component_spec_template.yaml",
"repo_id": "promptflow",
"token_count": 85
} | 51 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from enum import Enum
class RunMode(str, Enum):
"""An enumeration of possible run modes."""
Test = "Test"
SingleNode = "Sing... | promptflow/src/promptflow/promptflow/contracts/run_mode.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/contracts/run_mode.py",
"repo_id": "promptflow",
"token_count": 374
} | 52 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from dataclasses import dataclass
from typing import Any, Dict, Mapping
from promptflow.contracts.run_info import FlowRunInfo, RunInfo
@... | promptflow/src/promptflow/promptflow/executor/_result.py/0 | {
"file_path": "promptflow/src/promptflow/promptflow/executor/_result.py",
"repo_id": "promptflow",
"token_count": 669
} | 53 |
from pathlib import Path
PROMOTFLOW_ROOT = Path(__file__).parent.parent
RUNTIME_TEST_CONFIGS_ROOT = Path(PROMOTFLOW_ROOT / "tests/test_configs/runtime")
EXECUTOR_REQUESTS_ROOT = Path(PROMOTFLOW_ROOT / "tests/test_configs/executor_api_requests")
MODEL_ROOT = Path(PROMOTFLOW_ROOT / "tests/test_configs/e2e_samples")
CONN... | promptflow/src/promptflow/tests/_constants.py/0 | {
"file_path": "promptflow/src/promptflow/tests/_constants.py",
"repo_id": "promptflow",
"token_count": 322
} | 54 |
from pathlib import Path
from tempfile import mkdtemp
import pytest
from promptflow.batch import BatchEngine
from promptflow.batch._result import BatchResult
from ..utils import get_flow_folder, get_flow_inputs_file, get_yaml_file
@pytest.mark.usefixtures("use_secrets_config_file", "dev_connections")
@pytest.mark.... | promptflow/src/promptflow/tests/executor/e2etests/test_langchain.py/0 | {
"file_path": "promptflow/src/promptflow/tests/executor/e2etests/test_langchain.py",
"repo_id": "promptflow",
"token_count": 530
} | 55 |
inputs: {}
outputs: {}
nodes:
- name: tool_with_conn
type: python
source:
type: package
tool: tool_with_connection
inputs:
conn: test_conn
| promptflow/src/promptflow/tests/executor/package_tools/tool_with_connection/flow.dag.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/executor/package_tools/tool_with_connection/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 63
} | 56 |
import inspect
import pytest
from promptflow._core.generator_proxy import GeneratorProxy
from promptflow._core.tracer import Tracer, _create_trace_from_function_call, _traced, trace
from promptflow.connections import AzureOpenAIConnection
from promptflow.contracts.trace import Trace, TraceType
def generator():
... | promptflow/src/promptflow/tests/executor/unittests/_core/test_tracer.py/0 | {
"file_path": "promptflow/src/promptflow/tests/executor/unittests/_core/test_tracer.py",
"repo_id": "promptflow",
"token_count": 5794
} | 57 |
import json
from pathlib import Path
from tempfile import mkdtemp
from typing import Optional
from unittest.mock import AsyncMock, patch
import httpx
import pytest
from promptflow._utils.exception_utils import ExceptionPresenter
from promptflow.batch._base_executor_proxy import APIBasedExecutorProxy
from promptflow.b... | promptflow/src/promptflow/tests/executor/unittests/batch/test_base_executor_proxy.py/0 | {
"file_path": "promptflow/src/promptflow/tests/executor/unittests/batch/test_base_executor_proxy.py",
"repo_id": "promptflow",
"token_count": 4370
} | 58 |
import pytest
from promptflow._core.tool_meta_generator import PythonLoadError
from promptflow.exceptions import ErrorTarget
from promptflow.executor._errors import ResolveToolError
def code_with_bug():
1 / 0
def raise_resolve_tool_error(func, target=None, module=None):
try:
func()
except Excep... | promptflow/src/promptflow/tests/executor/unittests/executor/test_errors.py/0 | {
"file_path": "promptflow/src/promptflow/tests/executor/unittests/executor/test_errors.py",
"repo_id": "promptflow",
"token_count": 773
} | 59 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import logging
import os
import uuid
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path
from typing import Callable... | promptflow/src/promptflow/tests/sdk_cli_azure_test/conftest.py/0 | {
"file_path": "promptflow/src/promptflow/tests/sdk_cli_azure_test/conftest.py",
"repo_id": "promptflow",
"token_count": 7579
} | 60 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import base64
import json
from typing import Dict
from vcr.request import Request
from .constants import AzureMLResourceTypes, SanitizedV... | promptflow/src/promptflow/tests/sdk_cli_azure_test/recording_utilities/processors.py/0 | {
"file_path": "promptflow/src/promptflow/tests/sdk_cli_azure_test/recording_utilities/processors.py",
"repo_id": "promptflow",
"token_count": 4397
} | 61 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import pytest
from promptflow import PFClient
from promptflow._sdk._configuration import Configuration
AZUREML_RESOURCE_PROVIDER = "Micro... | promptflow/src/promptflow/tests/sdk_cli_global_config_test/conftest.py/0 | {
"file_path": "promptflow/src/promptflow/tests/sdk_cli_global_config_test/conftest.py",
"repo_id": "promptflow",
"token_count": 293
} | 62 |
import json
import os
import re
import pytest
from promptflow._core.operation_context import OperationContext
@pytest.mark.usefixtures("recording_injection", "setup_local_connection")
@pytest.mark.e2etest
def test_swagger(flow_serving_client):
swagger_dict = json.loads(flow_serving_client.get("/swagger.json").d... | promptflow/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_serve.py/0 | {
"file_path": "promptflow/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_serve.py",
"repo_id": "promptflow",
"token_count": 6615
} | 63 |
from pathlib import Path
import pytest
from sdk_cli_test.conftest import MODEL_ROOT
from promptflow._cli._pf._flow import _resolve_python_flow_additional_includes
@pytest.mark.unittest
def test_flow_serve_resolve_additional_includes():
# Assert flow path not changed if no additional includes
flow_path = (Pa... | promptflow/src/promptflow/tests/sdk_cli_test/unittests/test_flow_serve.py/0 | {
"file_path": "promptflow/src/promptflow/tests/sdk_cli_test/unittests/test_flow_serve.py",
"repo_id": "promptflow",
"token_count": 346
} | 64 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
import pytest
from ..utils import PFSOperations, check_activity_end_telemetry
@pytest.mark.usefixtures("use_secrets_config_file")
@pytes... | promptflow/src/promptflow/tests/sdk_pfs_test/e2etests/test_telemetry_apis.py/0 | {
"file_path": "promptflow/src/promptflow/tests/sdk_pfs_test/e2etests/test_telemetry_apis.py",
"repo_id": "promptflow",
"token_count": 1088
} | 65 |
$schema: https://azuremlschemas.azureedge.net/promptflow/latest/SerpConnection.schema.json
name: my_serp_connection
type: serp
api_key: "<to-be-replaced>"
| promptflow/src/promptflow/tests/test_configs/connections/serp_connection.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/connections/serp_connection.yaml",
"repo_id": "promptflow",
"token_count": 61
} | 66 |
{"name": "Red", "id_text": "1.0", "id_int": 1, "id_float": 1.0 }
{"name": "Blue", "id_text": "3.0", "id_int": 3, "id_float": 3.0 }
{"name": "Yellow", "id_text": "2.0", "id_int": 2, "id_float": 2.0 } | promptflow/src/promptflow/tests/test_configs/datas/load_data_cases/colors.jsonl/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/datas/load_data_cases/colors.jsonl",
"repo_id": "promptflow",
"token_count": 98
} | 67 |
import asyncio
from promptflow import trace
@trace
async def wait(n: int):
await asyncio.sleep(n)
@trace
async def dummy_llm(prompt: str, model: str, wait_seconds: int):
await wait(wait_seconds)
return prompt
async def my_flow(text: str, models: list = []):
tasks = []
for i, model in enumerat... | promptflow/src/promptflow/tests/test_configs/eager_flows/dummy_flow_with_trace/entry.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/eager_flows/dummy_flow_with_trace/entry.py",
"repo_id": "promptflow",
"token_count": 180
} | 68 |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
def my_flow1():
"""Simple flow without yaml."""
print("Hello world!")
def my_flow2():
"""Simple flow without yaml."""
pri... | promptflow/src/promptflow/tests/test_configs/eager_flows/multiple_entries/entry1.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/eager_flows/multiple_entries/entry1.py",
"repo_id": "promptflow",
"token_count": 83
} | 69 |
from promptflow import tool
@tool
def summary_result(input1: str="Node A not executed.", input2: str="Node B not executed.") -> str:
return input1 + ' ' + input2
| promptflow/src/promptflow/tests/test_configs/flows/activate_condition_always_met/summary_result.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/activate_condition_always_met/summary_result.py",
"repo_id": "promptflow",
"token_count": 50
} | 70 |
{
"text": "hi"
} | promptflow/src/promptflow/tests/test_configs/flows/all_depedencies_bypassed_with_activate_met/inputs.json/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/all_depedencies_bypassed_with_activate_met/inputs.json",
"repo_id": "promptflow",
"token_count": 13
} | 71 |
inputs:
text:
type: string
default: dummy_input
outputs:
output_prompt:
type: string
reference: ${async_fail.output}
nodes:
- name: async_fail
type: python
source:
type: code
path: async_fail.py
inputs:
s: ${inputs.text}
| promptflow/src/promptflow/tests/test_configs/flows/async_tools_failures/flow.dag.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/async_tools_failures/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 110
} | 72 |
environment:
python_requirements_txt: requirements.txt
version: 2
inputs:
chat_history:
type: list
is_chat_history: true
default: []
question:
type: string
is_chat_input: true
default: I am going to swim today for 30 min in Guangzhou city, how much
calories will I burn?
assistant_i... | promptflow/src/promptflow/tests/test_configs/flows/chat-with-assistant-no-file/flow.dag.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/chat-with-assistant-no-file/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 420
} | 73 |
inputs:
chat_history:
type: list
question:
type: string
is_chat_input: true
default: What is ChatGPT?
outputs:
answer:
type: string
reference: ${show_answer.output}
is_chat_output: true
nodes:
- inputs:
deployment_name: gpt-35-turbo
max_tokens: "256"
temperature: "0.7"
... | promptflow/src/promptflow/tests/test_configs/flows/chat_flow_with_exception/flow.dag.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/chat_flow_with_exception/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 272
} | 74 |
from promptflow import tool
@tool
def extract_incident_id(incident_content: str, incident_id: int):
if incident_id >= 0 and incident_id < 3:
return {
"has_incident_id": True,
"incident_id": incident_id,
"incident_content": incident_content
}
return {
... | promptflow/src/promptflow/tests/test_configs/flows/conditional_flow_with_activate/incident_id_extractor.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/conditional_flow_with_activate/incident_id_extractor.py",
"repo_id": "promptflow",
"token_count": 196
} | 75 |
from promptflow import tool
@tool
def square(input: int) -> int:
return input*input
| promptflow/src/promptflow/tests/test_configs/flows/conditional_flow_with_aggregate_bypassed/square.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/conditional_flow_with_aggregate_bypassed/square.py",
"repo_id": "promptflow",
"token_count": 27
} | 76 |
inputs:
image_list:
type: list
default:
- data:image/jpg;path: logo.jpg
- data:image/png;path: logo_2.png
image_dict:
type: object
default:
image_1:
data:image/jpg;path: logo.jpg
image_2:
data:image/png;path: logo_2.png
outputs:
output:
type: list
refere... | promptflow/src/promptflow/tests/test_configs/flows/eval_flow_with_composite_image/flow.dag.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/eval_flow_with_composite_image/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 439
} | 77 |
*.ipynb
.venv/
.data/
.env
.vscode/
outputs/
connection.json
.gitignore
README.md
eval_cli.md
data/
| promptflow/src/promptflow/tests/test_configs/flows/export/linux/flow/.amlignore/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/export/linux/flow/.amlignore",
"repo_id": "promptflow",
"token_count": 49
} | 78 |
import os
import openai
from dotenv import load_dotenv
from promptflow import tool
# The inputs section will change based on the arguments of the tool function, after you save the code
# Adding type to arguments and return value will help the system show the types properly
# Please update the function name/signature ... | promptflow/src/promptflow/tests/test_configs/flows/failed_flow/hello.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/failed_flow/hello.py",
"repo_id": "promptflow",
"token_count": 127
} | 79 |
tensorflow | promptflow/src/promptflow/tests/test_configs/flows/flow_with_environment/requirements/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/flow_with_environment/requirements",
"repo_id": "promptflow",
"token_count": 3
} | 80 |
import os
from langchain.chat_models import AzureChatOpenAI
from langchain_core.messages import HumanMessage
from langchain.agents.agent_types import AgentType
from langchain.agents.initialize import initialize_agent
from langchain.agents.load_tools import load_tools
from promptflow import tool
from promptflow.connec... | promptflow/src/promptflow/tests/test_configs/flows/flow_with_langchain_traces/test_langchain_traces.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/flow_with_langchain_traces/test_langchain_traces.py",
"repo_id": "promptflow",
"token_count": 434
} | 81 |
{"text": "Hello World!"}
| promptflow/src/promptflow/tests/test_configs/flows/flow_with_script_tool_with_custom_strong_type_connection/data.jsonl/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/flow_with_script_tool_with_custom_strong_type_connection/data.jsonl",
"repo_id": "promptflow",
"token_count": 9
} | 82 |
from promptflow import tool
from char_generator import character_generator
@tool
def echo(text):
"""Echo the input string."""
echo_text = "Echo - " + "".join(character_generator(text))
return echo_text | promptflow/src/promptflow/tests/test_configs/flows/generator_tools/echo.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/generator_tools/echo.py",
"repo_id": "promptflow",
"token_count": 71
} | 83 |
from promptflow import tool
from promptflow.connections import AzureOpenAIConnection
@tool
def conn_tool(conn: AzureOpenAIConnection):
assert isinstance(conn, AzureOpenAIConnection)
return conn.api_base | promptflow/src/promptflow/tests/test_configs/flows/llm_connection_override/conn_tool.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/llm_connection_override/conn_tool.py",
"repo_id": "promptflow",
"token_count": 68
} | 84 |
inputs:
number:
type: int
outputs:
output:
type: int
reference: ${mod_three.output.value}
nodes:
- name: mod_three
type: python
source:
type: code
path: mod_three.py
inputs:
number: ${inputs.number}
| promptflow/src/promptflow/tests/test_configs/flows/mod-n/three/flow.dag.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/mod-n/three/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 99
} | 85 |
{
"question": "What is the capital of the United States of America?",
"chat_history": []
}
| promptflow/src/promptflow/tests/test_configs/flows/openai_chat_api_flow/samples.json/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/openai_chat_api_flow/samples.json",
"repo_id": "promptflow",
"token_count": 33
} | 86 |
import os
from promptflow import tool
from promptflow.connections import CustomConnection
@tool
def print_secret(text: str, connection: CustomConnection):
print(connection["key1"])
print(connection["key2"])
return text
| promptflow/src/promptflow/tests/test_configs/flows/print_secret_flow/print_secret.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/print_secret_flow/print_secret.py",
"repo_id": "promptflow",
"token_count": 69
} | 87 |
inputs:
image_list:
type: list
default:
- data:image/jpg;path: logo.jpg
- data:image/png;path: logo_2.png
image_dict:
type: object
default:
image_1:
data:image/jpg;path: logo.jpg
image_2:
data:image/png;path: logo_2.png
outputs:
output:
type: list
refere... | promptflow/src/promptflow/tests/test_configs/flows/python_tool_with_composite_image/flow.dag.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/python_tool_with_composite_image/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 468
} | 88 |
system:
Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.
{% for item in chat_history %}
user:
{{item.inputs.question}}
{% if 'function_call' in item.outputs.llm_output %}
assistant:
Function generation requested, function = {{item.outputs.llm_outpu... | promptflow/src/promptflow/tests/test_configs/flows/sample_flow_with_functions/use_functions_with_chat_models.jinja2/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/sample_flow_with_functions/use_functions_with_chat_models.jinja2",
"repo_id": "promptflow",
"token_count": 204
} | 89 |
from promptflow import tool
@tool
def print_special_character(input1: str) -> str:
# Add special character to test if file read is working.
return "https://www.bing.com//"
| promptflow/src/promptflow/tests/test_configs/flows/script_with_special_character/script_with_special_character.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/script_with_special_character/script_with_special_character.py",
"repo_id": "promptflow",
"token_count": 61
} | 90 |
[
{
"input": "atom",
"index": 0
},
{
"input": "atom",
"index": 6
},
{
"input": "atom",
"index": 12
},{
"input": "atom",
"index": 18
},{
"input": "atom",
"index": 24
},{
"input": "atom",
"index": 30
},{
"input": "atom",
"index": 36
},{
... | promptflow/src/promptflow/tests/test_configs/flows/simple_flow_with_ten_inputs/samples.json/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/simple_flow_with_ten_inputs/samples.json",
"repo_id": "promptflow",
"token_count": 239
} | 91 |
{"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"}
| promptflow/src/promptflow/tests/test_configs/flows/web_classification/data.jsonl/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/web_classification/data.jsonl",
"repo_id": "promptflow",
"token_count": 112
} | 92 |
#!/bin/bash
# Install your packages here.
| promptflow/src/promptflow/tests/test_configs/flows/web_classification_no_variants/.promptflow/flow.env_files/setup.sh/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/web_classification_no_variants/.promptflow/flow.env_files/setup.sh",
"repo_id": "promptflow",
"token_count": 13
} | 93 |
Your task is to classify a given url into one of the following types:
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.
Here are a few examples:
{% for ex in examples %}
URL: {{ex.url}}
Text... | promptflow/src/promptflow/tests/test_configs/flows/web_classification_no_variants_unordered/classify_with_llm.jinja2/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/web_classification_no_variants_unordered/classify_with_llm.jinja2",
"repo_id": "promptflow",
"token_count": 165
} | 94 |
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.
Text: {{text}}
Summary:
| promptflow/src/promptflow/tests/test_configs/flows/web_classification_v1/summarize_text_content__variant_1.jinja2/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/web_classification_v1/summarize_text_content__variant_1.jinja2",
"repo_id": "promptflow",
"token_count": 39
} | 95 |
from promptflow import tool
@tool
def convert_to_dict(input_str: str):
raise Exception("mock exception")
| promptflow/src/promptflow/tests/test_configs/flows/web_classification_with_exception/convert_to_dict.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/flows/web_classification_with_exception/convert_to_dict.py",
"repo_id": "promptflow",
"token_count": 36
} | 96 |
interactions:
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0
Python/3.10.13 (Windows-... | promptflow/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_cancel_run.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_cancel_run.yaml",
"repo_id": "promptflow",
"token_count": 26473
} | 97 |
interactions:
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0
Python/3.10.13 (Windows-... | promptflow/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_stream_failed_run_logs.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_stream_failed_run_logs.yaml",
"repo_id": "promptflow",
"token_count": 70066
} | 98 |
flow: ../flows/web_classification
data: ../datas/webClassification1.jsonl
column_mapping:
url: "${data.url}"
variant: ${summarize_text_content.variant_0}
# run config: env related
environment_variables: env_file
connections:
classify_with_llm:
connection: new_ai_connection
# model is also supported ... | promptflow/src/promptflow/tests/test_configs/runs/run_with_connections_model.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/runs/run_with_connections_model.yaml",
"repo_id": "promptflow",
"token_count": 131
} | 99 |
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.3... | promptflow/src/promptflow/tests/test_configs/runs/web_classification_variant_0_20231205_120253_104100/snapshot/fetch_text_content_from_url.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/runs/web_classification_variant_0_20231205_120253_104100/snapshot/fetch_text_content_from_url.py",
"repo_id": "promptflow",
"token_count": 484
} | 100 |
from pathlib import Path
import importlib.util
from promptflow import PFClient
package_name = "tool_package"
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.
"""
# Th... | promptflow/src/promptflow/tests/test_configs/tools/tool_package/tool_package/utils.py/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/tools/tool_package/tool_package/utils.py",
"repo_id": "promptflow",
"token_count": 172
} | 101 |
inputs:
num:
type: int
outputs:
content:
type: string
reference: ${divide_num.output}
nodes:
- name: divide_num
type: python
source:
type: code
path: divide_num.py
inputs:
num: ${inputs.num}
activate:
when: ${inputs.num} > 0 | promptflow/src/promptflow/tests/test_configs/wrong_flows/invalid_activate_config/flow.dag.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/wrong_flows/invalid_activate_config/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 115
} | 102 |
inputs:
num:
type: int
outputs:
content:
type: string
reference: ${another_stringify_num.output}
nodes:
- name: stringify_num
type: python
source:
type: code
path: stringify_num.py
inputs:
num: ${inputs.num}
| promptflow/src/promptflow/tests/test_configs/wrong_flows/outputs_reference_not_valid/flow.dag.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/wrong_flows/outputs_reference_not_valid/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 103
} | 103 |
inputs:
text:
type: string
outputs:
output:
type: string
reference: ${search_by_text.output.search_metadata}
nodes:
- name: search_by_text
type: python
source:
type: package
tool: promptflow.tools.serpapi.SerpAPI.search_11
inputs:
connection: serp_connection
query: ${inputs.text}
... | promptflow/src/promptflow/tests/test_configs/wrong_flows/wrong_tool_in_package_tools/flow.dag.yaml/0 | {
"file_path": "promptflow/src/promptflow/tests/test_configs/wrong_flows/wrong_tool_in_package_tools/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 132
} | 104 |
# Manage flows
:::{admonition} Experimental feature
This is an experimental feature, and may change at any time. Learn [more](../../how-to-guides/faq.md#stable-vs-experimental).
:::
This documentation will walk you through how to manage your flow with CLI and SDK on [Azure AI](https://learn.microsoft.com/en-us/azure/... | promptflow/docs/cloud/azureai/manage-flows.md/0 | {
"file_path": "promptflow/docs/cloud/azureai/manage-flows.md",
"repo_id": "promptflow",
"token_count": 1304
} | 0 |
# Deploy a flow using Docker
:::{admonition} Experimental feature
This is an experimental feature, and may change at any time. Learn [more](../faq.md#stable-vs-experimental).
:::
There are two steps to deploy a flow using docker:
1. Build the flow as docker format.
2. Build and run the docker image.
## Build a flow ... | promptflow/docs/how-to-guides/deploy-a-flow/deploy-using-docker.md/0 | {
"file_path": "promptflow/docs/how-to-guides/deploy-a-flow/deploy-using-docker.md",
"repo_id": "promptflow",
"token_count": 1142
} | 1 |
# Develop a tool
We provide guides on how to develop a tool and use it.
```{toctree}
:maxdepth: 1
:hidden:
create-and-use-tool-package
add-a-tool-icon
add-category-and-tags-for-tool
use-file-path-as-tool-input
customize_an_llm_tool
create-cascading-tool-inputs
create-your-own-custom-strong-type-connection
create-dyna... | promptflow/docs/how-to-guides/develop-a-tool/index.md/0 | {
"file_path": "promptflow/docs/how-to-guides/develop-a-tool/index.md",
"repo_id": "promptflow",
"token_count": 130
} | 2 |
# Integrations
The Integrations section contains documentation on custom extensions created by the community that expand prompt flow's capabilities.
These include tools that enrich flows, as well as tutorials on innovative ways to use prompt flow.
```{toctree}
:maxdepth: 1
tools/index
llms/index
``` | promptflow/docs/integrations/index.md/0 | {
"file_path": "promptflow/docs/integrations/index.md",
"repo_id": "promptflow",
"token_count": 74
} | 3 |
# Prompt
## Introduction
The Prompt Tool in PromptFlow offers a collection of textual templates that serve as a starting point for creating prompts.
These templates, based on the Jinja2 template engine, facilitate the definition of prompts. The tool proves useful
when prompt tuning is required prior to feeding the p... | promptflow/docs/reference/tools-reference/prompt-tool.md/0 | {
"file_path": "promptflow/docs/reference/tools-reference/prompt-tool.md",
"repo_id": "promptflow",
"token_count": 783
} | 4 |
$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json
environment:
python_requirements_txt: requirements.txt
inputs:
chat_history:
type: list
is_chat_history: true
default: []
question:
type: string
is_chat_input: true
default: '1+1=?'
outputs:
answer:
type... | promptflow/examples/flows/chat/chat-math-variant/flow.dag.yaml/0 | {
"file_path": "promptflow/examples/flows/chat/chat-math-variant/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 977
} | 5 |
import PyPDF2
import faiss
import os
from pathlib import Path
from utils.oai import OAIEmbedding
from utils.index import FAISSIndex
from utils.logging import log
from utils.lock import acquire_lock
from constants import INDEX_DIR
def create_faiss_index(pdf_path: str) -> str:
chunk_size = int(os.environ.get("CHU... | promptflow/examples/flows/chat/chat-with-pdf/chat_with_pdf/build_index.py/0 | {
"file_path": "promptflow/examples/flows/chat/chat-with-pdf/chat_with_pdf/build_index.py",
"repo_id": "promptflow",
"token_count": 947
} | 6 |
from promptflow import tool
from chat_with_pdf.main import chat_with_pdf
@tool
def chat_with_pdf_tool(question: str, pdf_url: str, history: list, ready: str):
history = convert_chat_history_to_chatml_messages(history)
stream, context = chat_with_pdf(question, pdf_url, history)
answer = ""
for str in... | promptflow/examples/flows/chat/chat-with-pdf/chat_with_pdf_tool.py/0 | {
"file_path": "promptflow/examples/flows/chat/chat-with-pdf/chat_with_pdf_tool.py",
"repo_id": "promptflow",
"token_count": 409
} | 7 |
import unittest
import promptflow.azure as azure
from azure.identity import DefaultAzureCredential, InteractiveBrowserCredential
from base_test import BaseTest
import os
from promptflow._sdk._errors import InvalidRunStatusError
class TestChatWithPDFAzure(BaseTest):
def setUp(self):
super().setUp()
... | promptflow/examples/flows/chat/chat-with-pdf/tests/azure_chat_with_pdf_test.py/0 | {
"file_path": "promptflow/examples/flows/chat/chat-with-pdf/tests/azure_chat_with_pdf_test.py",
"repo_id": "promptflow",
"token_count": 1653
} | 8 |
from promptflow import tool
import json
def get_current_weather(location, unit="fahrenheit"):
"""Get the current weather in a given location"""
weather_info = {
"location": location,
"temperature": "72",
"unit": unit,
"forecast": ["sunny", "windy"],
}
return weather_inf... | promptflow/examples/flows/chat/use_functions_with_chat_models/run_function.py/0 | {
"file_path": "promptflow/examples/flows/chat/use_functions_with_chat_models/run_function.py",
"repo_id": "promptflow",
"token_count": 474
} | 9 |
from promptflow import tool
def string_to_number(raw_string: str) -> float:
''' Try to parse the prediction string and groundtruth string to float number.
Support parse int, float, fraction and recognize non-numeric string with wrong format.
Wrong format cases: 'the answer is \box{2/3}', '0, 5, or any num... | promptflow/examples/flows/evaluation/eval-chat-math/line_process.py/0 | {
"file_path": "promptflow/examples/flows/evaluation/eval-chat-math/line_process.py",
"repo_id": "promptflow",
"token_count": 740
} | 10 |
# Groundedness Evaluation
This is a flow leverage llm to eval groundedness: whether answer is stating facts that are all present in the given context.
Tools used in this flow:
- `python` tool
- built-in `llm` tool
### 0. Setup connection
Prepare your Azure Open AI resource follow this [instruction](https://learn.mi... | promptflow/examples/flows/evaluation/eval-groundedness/README.md/0 | {
"file_path": "promptflow/examples/flows/evaluation/eval-groundedness/README.md",
"repo_id": "promptflow",
"token_count": 369
} | 11 |
$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json
environment:
python_requirements_txt: requirements.txt
inputs:
document_path:
type: string
default: ./document1.txt
language:
type: string
default: en
outputs:
extractive_summary:
type: string
reference: ${E... | promptflow/examples/flows/integrations/azure-ai-language/analyze_documents/flow.dag.yaml/0 | {
"file_path": "promptflow/examples/flows/integrations/azure-ai-language/analyze_documents/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 1037
} | 12 |
from promptflow import tool
@tool
def functions_format() -> list:
functions = [
{
"name": "search",
"description": """The action will search this entity name on Wikipedia and returns the first {count}
sentences if it exists. If not, it will return some related entities ... | promptflow/examples/flows/standard/autonomous-agent/functions.py/0 | {
"file_path": "promptflow/examples/flows/standard/autonomous-agent/functions.py",
"repo_id": "promptflow",
"token_count": 1183
} | 13 |
from promptflow import tool
@tool
def product_recommendation(query: str) -> str:
print(f"Your query is {query}.\nRecommending products...")
return "I recommend promptflow to you, which can solve your problem very well."
| promptflow/examples/flows/standard/conditional-flow-for-switch/product_recommendation.py/0 | {
"file_path": "promptflow/examples/flows/standard/conditional-flow-for-switch/product_recommendation.py",
"repo_id": "promptflow",
"token_count": 67
} | 14 |
import io
from promptflow import tool
from promptflow.contracts.multimedia import Image
from PIL import Image as PIL_Image
@tool
def passthrough(input_image: Image) -> Image:
image_stream = io.BytesIO(input_image)
pil_image = PIL_Image.open(image_stream)
flipped_image = pil_image.transpose(PIL_Image.FLIP_... | promptflow/examples/flows/standard/describe-image/flip_image.py/0 | {
"file_path": "promptflow/examples/flows/standard/describe-image/flip_image.py",
"repo_id": "promptflow",
"token_count": 165
} | 15 |
# Generate Python docstring
This example can help you automatically generate Python code's docstring and return the modified code.
Tools used in this flow:
- `load_code` tool, it can load code from a file path.
- Load content from a local file.
- Loading content from a remote URL, currently loading HTML content, n... | promptflow/examples/flows/standard/gen-docstring/README.md/0 | {
"file_path": "promptflow/examples/flows/standard/gen-docstring/README.md",
"repo_id": "promptflow",
"token_count": 730
} | 16 |
from typing import Union
from promptflow import tool
from typing import Dict, List
from promptflow.connections import AzureOpenAIConnection, OpenAIConnection, CognitiveSearchConnection
def generate_index_json(
index_type: str,
index: str = "",
index_connection: CognitiveSearchConnection = "",
index_n... | promptflow/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_generated_by_input.py/0 | {
"file_path": "promptflow/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_generated_by_input.py",
"repo_id": "promptflow",
"token_count": 1712
} | 17 |
import pytest
import unittest
from my_tool_package.tools.tool_with_custom_strong_type_connection import MyCustomConnection, my_tool
@pytest.fixture
def my_custom_connection() -> MyCustomConnection:
my_custom_connection = MyCustomConnection(
{
"api_key" : "my-api-key",
"api_base" :... | promptflow/examples/tools/tool-package-quickstart/tests/test_tool_with_custom_strong_type_connection.py/0 | {
"file_path": "promptflow/examples/tools/tool-package-quickstart/tests/test_tool_with_custom_strong_type_connection.py",
"repo_id": "promptflow",
"token_count": 257
} | 18 |
$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json
inputs:
text:
type: string
default: Microsoft
outputs:
my_output:
type: string
reference: ${my_script_tool.output}
nodes:
- name: my_script_tool
type: python
source:
type: code
path: my_script_tool.py
inpu... | promptflow/examples/tools/use-cases/custom-strong-type-connection-script-tool-showcase/flow.dag.yaml/0 | {
"file_path": "promptflow/examples/tools/use-cases/custom-strong-type-connection-script-tool-showcase/flow.dag.yaml",
"repo_id": "promptflow",
"token_count": 157
} | 19 |
# Deploy flow as applications
This folder contains examples of how to build & deploy flow as applications like Web Application packaged in Docker format. | promptflow/examples/tutorials/flow-deploy/README.md/0 | {
"file_path": "promptflow/examples/tutorials/flow-deploy/README.md",
"repo_id": "promptflow",
"token_count": 28
} | 20 |
---
resources: examples/connections/azure_openai.yml, examples/flows/standard/web-classification
---
# Deploy flow using Kubernetes
This example demos how to deploy flow as a Kubernetes app.
We will use [web-classification](../../../flows/standard/web-classification/README.md) as example in this tutorial.
Please ensu... | promptflow/examples/tutorials/flow-deploy/kubernetes/README.md/0 | {
"file_path": "promptflow/examples/tutorials/flow-deploy/kubernetes/README.md",
"repo_id": "promptflow",
"token_count": 1912
} | 21 |
name: release-env
channels:
- defaults
- conda-forge
dependencies:
- pip
- pip:
- setuptools
- twine==4.0.0
- portalocker~=1.2
- setuptools_rust
- pytest
- pytest-xdist
- pytest-sugar
- pytest-timeout
- azure-keyvault
- azure-identity
| promptflow/scripts/building/release-env.yml/0 | {
"file_path": "promptflow/scripts/building/release-env.yml",
"repo_id": "promptflow",
"token_count": 134
} | 22 |
promptflow.connections package
==============================
.. autoclass:: promptflow.connections.AzureContentSafetyConnection
:members:
:undoc-members:
:show-inheritance:
:noindex:
.. autoclass:: promptflow.connections.AzureOpenAIConnection
:members:
:undoc-members:
:show-inheritance:
:noin... | promptflow/scripts/docs/promptflow.connections.rst/0 | {
"file_path": "promptflow/scripts/docs/promptflow.connections.rst",
"repo_id": "promptflow",
"token_count": 360
} | 23 |
# -*- mode: python ; coding: utf-8 -*-
from PyInstaller.utils.hooks import collect_data_files
from PyInstaller.utils.hooks import copy_metadata
datas = [('../resources/CLI_LICENSE.rtf', '.'), ('../../../../src/promptflow/NOTICE.txt', '.'),
('../../../../src/promptflow/promptflow/_sdk/data/executable/', './promptflow/_... | promptflow/scripts/installer/windows/scripts/promptflow.spec/0 | {
"file_path": "promptflow/scripts/installer/windows/scripts/promptflow.spec",
"repo_id": "promptflow",
"token_count": 788
} | 24 |
class Telemetry(object):
pass
| promptflow/scripts/readme/ghactions_driver/telemetry_obj.py/0 | {
"file_path": "promptflow/scripts/readme/ghactions_driver/telemetry_obj.py",
"repo_id": "promptflow",
"token_count": 12
} | 25 |
{% extends "workflow_skeleton.yml.jinja2" %}
{% block steps %}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate config.json for canary workspace (scheduled runs only)
if: github.event_name == 'schedule'
run: echo '${{ '{{' }} secrets.TEST_WORKSPACE_CON... | promptflow/scripts/readme/ghactions_driver/workflow_templates/workflow_config_json.yml.jinja2/0 | {
"file_path": "promptflow/scripts/readme/ghactions_driver/workflow_templates/workflow_config_json.yml.jinja2",
"repo_id": "promptflow",
"token_count": 647
} | 26 |
import argparse
import ast
import importlib
import json
import os
import sys
from ruamel.yaml import YAML
sys.path.append("src/promptflow-tools")
sys.path.append(os.getcwd())
from utils.generate_tool_meta_utils import generate_custom_llm_tools_in_module_as_dict, generate_python_tools_in_module_as_dict # noqa: E402,... | promptflow/scripts/tool/generate_package_tool_meta.py/0 | {
"file_path": "promptflow/scripts/tool/generate_package_tool_meta.py",
"repo_id": "promptflow",
"token_count": 2007
} | 27 |
import json
import os
import shutil
import subprocess
from datetime import datetime
from pathlib import Path
import requests
scripts_dir = os.path.join(os.getcwd(), "scripts")
index_url = "https://azuremlsdktestpypi.azureedge.net/test-promptflow/promptflow-tools"
ado_promptflow_repo_url_format = "https://{0}@dev.azur... | promptflow/scripts/tool/utils/repo_utils.py/0 | {
"file_path": "promptflow/scripts/tool/utils/repo_utils.py",
"repo_id": "promptflow",
"token_count": 1625
} | 28 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.