-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add parameters to box ai ask and text gen (box/box-openapi#445)
- Loading branch information
1 parent
ad3e599
commit fcd712a
Showing
13 changed files
with
123 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{ "engineHash": "4ca165c", "specHash": "9919482", "version": "1.0.0" } | ||
{ "engineHash": "4ca165c", "specHash": "871a814", "version": "1.0.0" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Box.Sdk.Gen; | ||
using System; | ||
using System.Collections.ObjectModel; | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
using Box.Sdk.Gen.Schemas; | ||
|
||
namespace Box.Sdk.Gen.Schemas { | ||
public class AiAskResponse { | ||
/// <summary> | ||
/// The answer provided by the LLM. | ||
/// </summary> | ||
[JsonPropertyName("answer")] | ||
public string Answer { get; } | ||
|
||
/// <summary> | ||
/// The ISO date formatted timestamp of when the answer to the prompt was created. | ||
/// </summary> | ||
[JsonPropertyName("created_at")] | ||
public System.DateTimeOffset CreatedAt { get; } | ||
|
||
/// <summary> | ||
/// The reason the response finishes. | ||
/// </summary> | ||
[JsonPropertyName("completion_reason")] | ||
public string? CompletionReason { get; init; } | ||
|
||
/// <summary> | ||
/// The citations of the LLM's answer reference. | ||
/// </summary> | ||
[JsonPropertyName("citations")] | ||
public IReadOnlyList<AiCitation>? Citations { get; init; } | ||
|
||
public AiAskResponse(string answer, System.DateTimeOffset createdAt) { | ||
Answer = answer; | ||
CreatedAt = createdAt; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Box.Sdk.Gen; | ||
using System.Text.Json.Serialization; | ||
using Box.Sdk.Gen.Internal; | ||
|
||
namespace Box.Sdk.Gen.Schemas { | ||
public class AiCitation { | ||
/// <summary> | ||
/// The specific content from where the answer was referenced. | ||
/// </summary> | ||
[JsonPropertyName("content")] | ||
public string? Content { get; init; } | ||
|
||
/// <summary> | ||
/// The id of the item. | ||
/// </summary> | ||
[JsonPropertyName("id")] | ||
public string? Id { get; init; } | ||
|
||
/// <summary> | ||
/// The type of the item. | ||
/// </summary> | ||
[JsonPropertyName("type")] | ||
[JsonConverter(typeof(StringEnumConverter<AiCitationTypeField>))] | ||
public StringEnum<AiCitationTypeField>? Type { get; init; } | ||
|
||
/// <summary> | ||
/// The name of the item. | ||
/// </summary> | ||
[JsonPropertyName("name")] | ||
public string? Name { get; init; } | ||
|
||
public AiCitation() { | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System.ComponentModel; | ||
|
||
namespace Box.Sdk.Gen.Schemas { | ||
public enum AiCitationTypeField { | ||
[Description("file")] | ||
File | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters