Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pf CLI] List all package tools in current environment #798

Merged
merged 53 commits into from
Oct 20, 2023

Conversation

lalala123123
Copy link
Contributor

Description

image

List all package tools in current environment.

(prompt_github) D:\Project\github_promptflow\promptflow>pf tool list
{
    "package": {
        "promptflow.tools.embedding.embedding": {
            "name": "Embedding",
            "description": "Use Open AI's embedding model to create an embedding vector representing the input text.",
            "type": "python",
            "module": "promptflow.tools.embedding",
            "function": "embedding",
            "inputs": {
                "connection": {
                    "type": [
                        "AzureOpenAIConnection",
                        "OpenAIConnection"
                    ]
                },
                "deployment_name": {
                    "type": [
                        "string"
                    ],
                    "enabled_by": "connection",
                    "enabled_by_type": [
                        "AzureOpenAIConnection"
                    ],
                    "capabilities": {
                        "completion": false,
                        "chat_completion": false,
                        "embeddings": true
                    },
                    "model_list": [
                        "text-embedding-ada-002",
                        "text-search-ada-doc-001",
                        "text-search-ada-query-001"
                    ]
                },
                "model": {
                    "type": [
                        "string"
                    ],
                    "enabled_by": "connection",
                    "enabled_by_type": [
                        "OpenAIConnection"
                    ],
                    "enum": [
                        "text-embedding-ada-002",
                        "text-search-ada-doc-001",
                        "text-search-ada-query-001"
                    ]
                },
                "input": {
                    "type": [
                        "string"
                    ]
                }
            },
            "package": "promptflow-tools",
            "package_version": "0.1.0b6"
        },
        "promptflow.tools.serpapi.SerpAPI.search": {
            "name": "Serp API",
            "description": "Use Serp API to obtain search results from a specific search engine.",
            "inputs": {
                "connection": {
                    "type": [
                        "SerpConnection"
                    ]
                },
                "engine": {
                    "default": "google",
                    "enum": [
                        "google",
                        "bing"
                    ],
                    "type": [
                        "string"
                    ]
                },
                "location": {
                    "default": "",
                    "type": [
                        "string"
                    ]
                },
                "num": {
                    "default": "10",
                    "type": [
                        "int"
                    ]
                },
                "query": {
                    "type": [
                        "string"
                    ]
                },
                "safe": {
                    "default": "off",
                    "enum": [
                        "active",
                        "off"
                    ],
                    "type": [
                        "string"
                    ]
                }
            },
            "type": "python",
            "module": "promptflow.tools.serpapi",
            "class_name": "SerpAPI",
            "function": "search",
            "package": "promptflow-tools",
            "package_version": "0.1.0b6"
        }
    },
    "code": {}
}

List package tools and code tools in flow:

(prompt_github) D:\Project\github_promptflow\promptflow>pf tool list --flow chat_flow

{
    "package": {
        "promptflow.tools.embedding.embedding": {
            "name": "Embedding",
            "description": "Use Open AI's embedding model to create an embedding vector representing the input text.",
            "type": "python",
            "module": "promptflow.tools.embedding",
            "function": "embedding",
            "inputs": {
                "connection": {
                    "type": [
                        "AzureOpenAIConnection",
                        "OpenAIConnection"
                    ]
                },
                "deployment_name": {
                    "type": [
                        "string"
                    ],
                    "enabled_by": "connection",
                    "enabled_by_type": [
                        "AzureOpenAIConnection"
                    ],
                    "capabilities": {
                        "completion": false,
                        "chat_completion": false,
                        "embeddings": true
                    },
                    "model_list": [
                        "text-embedding-ada-002",
                        "text-search-ada-doc-001",
                        "text-search-ada-query-001"
                    ]
                },
                "model": {
                    "type": [
                        "string"
                    ],
                    "enabled_by": "connection",
                    "enabled_by_type": [
                        "OpenAIConnection"
                    ],
                    "enum": [
                        "text-embedding-ada-002",
                        "text-search-ada-doc-001",
                        "text-search-ada-query-001"
                    ]
                },
                "input": {
                    "type": [
                        "string"
                    ]
                }
            },
            "package": "promptflow-tools",
            "package_version": "0.1.0b6"
        },
        "promptflow.tools.serpapi.SerpAPI.search": {
            "name": "Serp API",
            "description": "Use Serp API to obtain search results from a specific search engine.",
            "inputs": {
                "connection": {
                    "type": [
                        "SerpConnection"
                    ]
                },
                "engine": {
                    "default": "google",
                    "enum": [
                        "google",
                        "bing"
                    ],
                    "type": [
                        "string"
                    ]
                },
                "location": {
                    "default": "",
                    "type": [
                        "string"
                    ]
                },
                "num": {
                    "default": "10",
                    "type": [
                        "int"
                    ]
                },
                "query": {
                    "type": [
                        "string"
                    ]
                },
                "safe": {
                    "default": "off",
                    "enum": [
                        "active",
                        "off"
                    ],
                    "type": [
                        "string"
                    ]
                }
            },
            "type": "python",
            "module": "promptflow.tools.serpapi",
            "class_name": "SerpAPI",
            "function": "search",
            "package": "promptflow-tools",
            "package_version": "0.1.0b6"
        }
    },
    "code": {
        "chat.jinja2": {
            "type": "llm",
            "inputs": {
                "chat_history": {
                    "type": [
                        "string"
                    ]
                },
                "question": {
                    "type": [
                        "string"
                    ]
                }
            },
            "source": "chat.jinja2"
        },
        "show_answer.py": {
            "type": "python",
            "inputs": {
                "chat_answer": {
                    "type": [
                        "string"
                    ]
                }
            },
            "source": "show_answer.py",
            "function": "show_answer"
        }
    }
}

All Promptflow Contribution checklist:

  • The pull request does not introduce [breaking changes].
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: suggested workflow.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 05:01 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 06:07 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 06:07 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 06:07 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 06:07 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 06:07 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 06:42 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 06:42 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 06:42 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 06:42 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 06:42 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 07:03 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 07:15 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 07:15 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 07:15 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 07:15 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 07:15 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 07:46 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 07:47 — with GitHub Actions Inactive
@lalala123123 lalala123123 temporarily deployed to internal October 20, 2023 07:51 — with GitHub Actions Inactive
@lalala123123 lalala123123 merged commit bf779e2 into main Oct 20, 2023
31 checks passed
@lalala123123 lalala123123 deleted the zhrua/list_package_tool branch October 20, 2023 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli prompt flow CLI documentation Improvements or additions to documentation promptflow sdk prompt flow SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants