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

[draft] add flow sample with new llm #2764

Closed
wants to merge 55 commits into from
Closed

[draft] add flow sample with new llm #2764

wants to merge 55 commits into from

Conversation

chenslucky
Copy link
Contributor

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

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.

chjinche and others added 30 commits February 26, 2024 14:45
# Description

Add llm category for llm and llm-vision

Co-authored-by: yalu4 <[email protected]>
# Description

Add new llm and llm-vision tool doc


Tasks:
1. Add new llm doc, found there are missing params that are supported by
old llm tool, Created [Task
3028401](https://msdata.visualstudio.com/Vienna/_workitems/edit/3028401):
New llm tool need to add missing params that are supported by old llm
tool:
2. Add new llm-vision doc. Find the missing params that are supported by
openai chat api but that are missing in current vison tools.
  
By comparing the current llm chat existing apis and aoai/openai vision
params,
  Current llm chat params:
  - max_tokens
  - temperature
  - stop
  - top_p
  - presence_penalty
  - frequency_penalty
  - logic_bias
  - function_call
  - functions
  - reponse_format

  Current aoai/openai vision params:
  - max_tokens
  - temperature
  - stop
  - top_p
  - presence_penalty
  - frequency_penalty

The difference lies in **logic_bias**, **functions**, **function_call**
and **reponse_format**. **functions**, **function_call** and
**reponse_format** are not supported by vision model, so as
**logic_bias**.

Test:

![image](https://github.com/microsoft/promptflow/assets/46446115/e0e9d632-38f0-49ab-bf39-2088999cf846)

Test result:

![image](https://github.com/microsoft/promptflow/assets/46446115/448bced6-58e7-42fc-b5b1-c8d1cdf61392)


![image](https://github.com/microsoft/promptflow/assets/46446115/9828b62c-07aa-46d5-b428-ed89a402a53d)



![image](https://github.com/microsoft/promptflow/assets/46446115/ae6a534d-96a6-4485-964b-934bdced002c)

https://community.openai.com/t/does-the-model-gpt-4-vision-preview-have-function-calling/490197

---------

Co-authored-by: yalu4 <[email protected]>
# Description

Add ui hint for tools to select reusable tools

---------

Co-authored-by: yalu4 <[email protected]>
16oeahr and others added 23 commits April 1, 2024 14:03
# Description

Update llm tool yaml description in order to adapt different doc links
for aml, ai_studio and local.

Co-authored-by: yalu4 <[email protected]>
tools,tool_choice enabled_by api chat
# Description

Support tool and tool choice

- support role tool
- support assistant tool calls
- support validate tools and tool choice

Sample flow to use tools with chat model:
https://msdata.visualstudio.com/Vienna/_git/PromptFlow/pullrequest/1315644

---------

Co-authored-by: cs_lucky <[email protected]>
Co-authored-by: yalu4 <[email protected]>
# Description

Please add an informative description that covers that changes made by
the pull request and link all relevant issues.

# 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](../CONTRIBUTING.md).**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#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](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.

---------

Co-authored-by: cs_lucky <[email protected]>
# Description

Fix tool choice type to support both string and object. Related bug:
[Bug
3066602](https://msdata.visualstudio.com/Vienna/_workitems/edit/3066602):
[Extension] Tool choice fill in dict, but new llm tool receives it as a
string

Tested "auto", none and dict in local and flow can run successfully.

None:

![image](https://github.com/microsoft/promptflow/assets/46446115/1b102d13-1a2d-41de-957c-fcf0b78d0b36)

auto:

![image](https://github.com/microsoft/promptflow/assets/46446115/3ffb4aed-b927-4465-9ab7-f365c48e1bf9)


dict:

![image](https://github.com/microsoft/promptflow/assets/46446115/b54fb2a4-a034-4e36-95d3-8a9f1d2983e6)

Co-authored-by: yalu4 <[email protected]>
# Description

Please add an informative description that covers that changes made by
the pull request and link all relevant issues.

# 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](../CONTRIBUTING.md).**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#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](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.

---------

Co-authored-by: cs_lucky <[email protected]>
# Description

Add tool choice type string to guide user string is allowed

# All Promptflow Contribution checklist:
- [X] **The pull request does not introduce [breaking changes].**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [X] **I have read the [contribution guidelines](../CONTRIBUTING.md).**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#suggested-workflow).**

## General Guidelines and Best Practices
- [X] Title of the pull request is clear and informative.
- [X] 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](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.

---------

Co-authored-by: yalu4 <[email protected]>
# Description

LLM unit tests:

![image](https://github.com/microsoft/promptflow/assets/75061414/8f9fdc3e-aad5-4fc1-beb1-182615747924)

LLM-Vision unit tests:

![image](https://github.com/microsoft/promptflow/assets/75061414/3e28b1e9-5198-4efb-b26e-d46ac14ecf16)

# 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](../CONTRIBUTING.md).**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#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](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.

---------

Co-authored-by: cs_lucky <[email protected]>
…r" (#2720)

fix serving streaming by set tool metadata streaming_option_parameter
@chenslucky chenslucky requested review from a team as code owners April 11, 2024 13:22
@github-actions github-actions bot added documentation Improvements or additions to documentation promptflow-tools promptflow tools code examples Improvements on examples labels Apr 11, 2024
@chenslucky chenslucky closed this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation examples Improvements on examples promptflow-tools promptflow tools code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants