Skip to content

Commit fcf6c66

Browse files
committed
add comment based help
1 parent 63738ff commit fcf6c66

5 files changed

+45
-0
lines changed

Public/Disable-ChatPersistence.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
function Disable-ChatPersistence {
2+
<#
3+
.SYNOPSIS
4+
Disables chat persistence.
5+
6+
.DESCRIPTION
7+
This function disables chat persistence by setting the $ChatPersistence variable to $false.
8+
9+
.EXAMPLE
10+
Disable-ChatPersistence
11+
#>
212
$Script:ChatPersistence = $false
313
}

Public/Enable-ChatPersistence.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
function Enable-ChatPersistence {
2+
<#
3+
.SYNOPSIS
4+
Enables chat persistence.
5+
6+
.DESCRIPTION
7+
The Enable-ChatPersistence function sets the $Script:ChatPersistence variable to $true, which enables chat persistence.
8+
9+
.EXAMPLE
10+
Enable-ChatPersistence
11+
#>
12+
213
$Script:ChatPersistence = $true
314
}

Public/Get-ChatPersistence.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
function Get-ChatPersistence {
2+
<#
3+
.SYNOPSIS
4+
Retrieves the chat persistence flag.
5+
#>
26
$Script:ChatPersistence
37
}

Public/Get-CompletionFromMessages.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
function Get-CompletionFromMessages {
2+
<#
3+
.SYNOPSIS
4+
Gets completion suggestions based on the array of messages.
5+
6+
.DESCRIPTION
7+
The Get-CompletionFromMessages function returns completion suggestion based on the messages.
8+
9+
.PARAMETER Messages
10+
Specifies the chat messages to use for generating completion suggestions.
11+
12+
.EXAMPLE
13+
Get-CompletionFromMessages $(
14+
New-ChatMessageTemplate -Role system 'You are a PowerShell expert'
15+
New-ChatMessageTemplate -Role user 'List even numbers between 1 and 10'
16+
)
17+
#>
18+
[CmdletBinding()]
219
param(
320
[Parameter(Mandatory)]
421
$Messages

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# v0.7.6
22

3+
- Implement mechanism to turn on/off persistence of chat message
4+
- Add `Get-CompletionFromMessages` so you can get messages can be passes standalone to get the completions
5+
36
# v0.7.5
47

58
- Fixed spaces in property names [#141](https://github.com/dfinke/PowerShellAI/issues/141)

0 commit comments

Comments
 (0)