Skip to content

Commit 2aeff50

Browse files
authored
Add log_props support (#156)
2 parents e710dee + ae370e3 commit 2aeff50

28 files changed

+315
-25
lines changed

docs/ChatGptNet.Models/ChatGptChoice.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class ChatGptChoice
1616
| [FinishReason](ChatGptChoice/FinishReason.md) { getset; } | Gets or sets a value specifying why the choice has been returned. |
1717
| [Index](ChatGptChoice/Index.md) { getset; } | Gets or sets the index of the choice in the list. |
1818
| [IsFiltered](ChatGptChoice/IsFiltered.md) { get; } | Gets or sets a value indicating whether the this [`ChatGptChoice`](./ChatGptChoice.md) has been filtered by the content filtering system. |
19+
| [LogProbabilities](ChatGptChoice/LogProbabilities.md) { getset; } | Gets or sets the log probabilities associated with this [`ChatGptChoice`](./ChatGptChoice.md). |
1920
| [Message](ChatGptChoice/Message.md) { getset; } | Gets or sets the message associated with this [`ChatGptChoice`](./ChatGptChoice.md), if any. |
2021

2122
## See Also
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ChatGptChoice.LogProbabilities property
2+
3+
Gets or sets the log probabilities associated with this [`ChatGptChoice`](../ChatGptChoice.md).
4+
5+
```csharp
6+
public ChatGptLogProbability? LogProbabilities { get; set; }
7+
```
8+
9+
## See Also
10+
11+
* class [ChatGptLogProbability](../ChatGptLogProbability.md)
12+
* class [ChatGptLogProbabilityContent](../ChatGptLogProbabilityContent.md)
13+
* class [ChatGptChoice](../ChatGptChoice.md)
14+
* namespace [ChatGptNet.Models](../../ChatGptNet.md)
15+
16+
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ChatGptLogProbability class
2+
3+
Represents the log probability information of a [`completion choice`](./ChatGptChoice.md).
4+
5+
```csharp
6+
public class ChatGptLogProbability
7+
```
8+
9+
## Public Members
10+
11+
| name | description |
12+
| --- | --- |
13+
| [ChatGptLogProbability](ChatGptLogProbability/ChatGptLogProbability.md)() | The default constructor. |
14+
| [Content](ChatGptLogProbability/Content.md) { get; set; } | Gets or sets the list of message content tokens with log probability information. |
15+
16+
## See Also
17+
18+
* namespace [ChatGptNet.Models](../ChatGptNet.md)
19+
* [ChatGptLogProbability.cs](https://github.com/marcominerva/ChatGptNet/tree/master/src/ChatGptNet/Models/ChatGptLogProbability.cs)
20+
21+
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ChatGptLogProbability constructor
2+
3+
The default constructor.
4+
5+
```csharp
6+
public ChatGptLogProbability()
7+
```
8+
9+
## See Also
10+
11+
* class [ChatGptLogProbability](../ChatGptLogProbability.md)
12+
* namespace [ChatGptNet.Models](../../ChatGptNet.md)
13+
14+
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# ChatGptLogProbability.Content property
2+
3+
Gets or sets the list of message content tokens with log probability information.
4+
5+
```csharp
6+
public IEnumerable<ChatGptLogProbabilityContent> Content { get; set; }
7+
```
8+
9+
## See Also
10+
11+
* class [ChatGptLogProbabilityContent](../ChatGptLogProbabilityContent.md)
12+
* class [ChatGptLogProbability](../ChatGptLogProbability.md)
13+
* namespace [ChatGptNet.Models](../../ChatGptNet.md)
14+
15+
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# ChatGptLogProbabilityContent class
2+
3+
Represents a message content token with log probability information.
4+
5+
```csharp
6+
public class ChatGptLogProbabilityContent
7+
```
8+
9+
## Public Members
10+
11+
| name | description |
12+
| --- | --- |
13+
| [ChatGptLogProbabilityContent](ChatGptLogProbabilityContent/ChatGptLogProbabilityContent.md)() | The default constructor. |
14+
| [Bytes](ChatGptLogProbabilityContent/Bytes.md) { get; set; } | Gets or sets a list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. |
15+
| [LogProbality](ChatGptLogProbabilityContent/LogProbality.md) { getset; } | Gets or sets the log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely. |
16+
| [Token](ChatGptLogProbabilityContent/Token.md) { getset; } | Gets or sets the token. |
17+
| [TopLogProbabilities](ChatGptLogProbabilityContent/TopLogProbabilities.md) { getset; } | Gets or sets the list of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested [`TopLogProbabilities`](./ChatGptParameters/TopLogProbabilities.md) returned. |
18+
19+
## See Also
20+
21+
* namespace [ChatGptNet.Models](../ChatGptNet.md)
22+
* [ChatGptLogProbabilityContent.cs](https://github.com/marcominerva/ChatGptNet/tree/master/src/ChatGptNet/Models/ChatGptLogProbabilityContent.cs)
23+
24+
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ChatGptLogProbabilityContent.Bytes property
2+
3+
Gets or sets a list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
4+
5+
```csharp
6+
public IEnumerable<byte>? Bytes { get; set; }
7+
```
8+
9+
## See Also
10+
11+
* class [ChatGptLogProbabilityContent](../ChatGptLogProbabilityContent.md)
12+
* namespace [ChatGptNet.Models](../../ChatGptNet.md)
13+
14+
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ChatGptLogProbabilityContent constructor
2+
3+
The default constructor.
4+
5+
```csharp
6+
public ChatGptLogProbabilityContent()
7+
```
8+
9+
## See Also
10+
11+
* class [ChatGptLogProbabilityContent](../ChatGptLogProbabilityContent.md)
12+
* namespace [ChatGptNet.Models](../../ChatGptNet.md)
13+
14+
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ChatGptLogProbabilityContent.LogProbality property
2+
3+
Gets or sets the log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely.
4+
5+
```csharp
6+
public double LogProbality { get; set; }
7+
```
8+
9+
## See Also
10+
11+
* class [ChatGptLogProbabilityContent](../ChatGptLogProbabilityContent.md)
12+
* namespace [ChatGptNet.Models](../../ChatGptNet.md)
13+
14+
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ChatGptLogProbabilityContent.Token property
2+
3+
Gets or sets the token.
4+
5+
```csharp
6+
public string Token { get; set; }
7+
```
8+
9+
## See Also
10+
11+
* class [ChatGptLogProbabilityContent](../ChatGptLogProbabilityContent.md)
12+
* namespace [ChatGptNet.Models](../../ChatGptNet.md)
13+
14+
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->

0 commit comments

Comments
 (0)