Skip to content

Commit

Permalink
Sync API spec updates openai/openai-openapi#211
Browse files Browse the repository at this point in the history
  • Loading branch information
mkht committed Mar 30, 2024
1 parent e52a99a commit 307de7e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Docs/Add-ThreadMessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Position: 0
```
### -Role
The role of the entity that is creating the message. Currently only `user` is supported.
The role of the entity that is creating the message. One of `user` or `assistant`

```yaml
Type: String
Expand Down
11 changes: 11 additions & 0 deletions Docs/Start-ThreadRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Start-ThreadRun
[-UseCodeInterpreter]
[-UseRetrieval]
[-MetaData <IDictionary>]
[-Temperature <Double>]
[-Stream]
[-Format <String>]
[-TimeoutSec <Int32>]
Expand Down Expand Up @@ -107,6 +108,16 @@ Required: False
Position: Named
```
### -Temperature
What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.

```yaml
Type: Double
Required: False
Position: Named
```

### -Tools
Override the tools the assistant can use for this run.

Expand Down
8 changes: 8 additions & 0 deletions Public/Runs/Start-ThreadRun.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function Start-ThreadRun {

[Parameter(ParameterSetName = 'ThreadAndRun')]
[Parameter(ParameterSetName = 'ThreadAndRun_Stream')]
[Completions('user', 'assistant')]
[string][LowerCaseTransformation()]$Role = 'user',

[Parameter(ParameterSetName = 'ThreadAndRun')]
Expand All @@ -82,6 +83,10 @@ function Start-ThreadRun {
[Parameter()]
[System.Collections.IDictionary]$MetaData,

[Parameter()]
[ValidateRange(0.0, 2.0)]
[double]$Temperature,

[Parameter(Mandatory = $true, ParameterSetName = 'Run_Stream')]
[Parameter(Mandatory = $true, ParameterSetName = 'ThreadAndRun_Stream')]
[switch]$Stream,
Expand Down Expand Up @@ -218,6 +223,9 @@ function Start-ThreadRun {
if ($PSBoundParameters.ContainsKey('Metadata')) {
$PostBody.metadata = $Metadata
}
if ($PSBoundParameters.ContainsKey('Temperature')) {
$PostBody.temperature = $Temperature
}
if (($Tools.Count -gt 0) -or $PSBoundParameters.ContainsKey('Tools')) {
$PostBody.tools = $Tools
}
Expand Down
1 change: 1 addition & 0 deletions Public/Threads/Add-ThreadMessage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function Add-ThreadMessage {
[string]$Message,

[Parameter()]
[Completions('user', 'assistant')]
[string][LowerCaseTransformation()]$Role = 'user',

[Parameter()]
Expand Down

0 comments on commit 307de7e

Please sign in to comment.