Skip to content

Commit

Permalink
[Tools] change max_tokens default value to 512 (#1417)
Browse files Browse the repository at this point in the history
This pull request includes a single change to the `openai_gpt4v.yaml`
file in the `promptflow-tools` package. The default value for
`max_tokens` has been updated to 512.

* <a
href="diffhunk://#diff-b9a4c02387f38efc06088f27b380851606f5e7b646aa65c3e6819d772a30f63dL35-R35">`src/promptflow-tools/promptflow/tools/yamls/openai_gpt4v.yaml`</a>:
Updated the default value for `max_tokens` to 512.# 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: Meng Lan <[email protected]>
  • Loading branch information
melionel and melionel authored Dec 7, 2023
1 parent e968bdb commit f86235b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/reference/tools-reference/openai-gpt-4v-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Setup connections to provisioned resources in prompt flow.
| connection | OpenAI | the OpenAI connection to be used in the tool | Yes |
| model | string | the language model to use, currently only support gpt-4-vision-preview | Yes |
| prompt | string | The text prompt that the language model will use to generate it's response. | Yes |
| max\_tokens | integer | the maximum number of tokens to generate in the response. Default is a low value decided by [OpenAI API](https://platform.openai.com/docs/guides/vision). | No |
| max\_tokens | integer | the maximum number of tokens to generate in the response. Default is 512. | No |
| temperature | float | the randomness of the generated text. Default is 1. | No |
| stop | list | the stopping sequence for the generated text. Default is null. | No |
| top_p | float | the probability of using the top choice from the generated tokens. Default is 1. | No |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ promptflow.tools.openai_gpt4v.OpenAI.chat:
type:
- double
max_tokens:
default: ""
default: 512
type:
- int
stop:
Expand Down

0 comments on commit f86235b

Please sign in to comment.