Updating github integration

This commit is contained in:
Niklas Nielsen
2024-05-24 18:26:16 -07:00
commit 65b44423c6
179 changed files with 23972 additions and 0 deletions

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
# This allows generated code to be indexed correctly
*.go linguist-generated=false

25
.github/workflows/sdk_generation.yaml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Generate
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
schedule:
- cron: 0 0 * * *
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: pr
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
# .gitignore

199
.speakeasy/gen.lock Executable file
View File

@@ -0,0 +1,199 @@
lockVersion: 2.0.0
id: af921c1a-d48f-4ab5-a412-4cf4ba8a50ad
management:
docChecksum: 5e7cc152f137f5919734cc70b836a4d6
docVersion: 1.0.0
speakeasyVersion: 1.296.1
generationVersion: 2.338.1
releaseVersion: 0.0.1
configChecksum: e63fe754c82a6ad123e8ccf7b0e616cd
features:
go:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.4
core: 3.4.10
deprecations: 2.81.1
examples: 2.81.3
flattening: 2.81.1
getRequestBodies: 2.81.1
globalSecurity: 2.82.9
globalSecurityCallbacks: 0.1.0
globalSecurityFlattening: 0.1.0
globalServerURLs: 2.82.2
globals: 2.82.2
intellisenseMarkdownSupport: 0.1.0
nameOverrides: 2.81.2
nullables: 0.1.0
responseFormat: 0.1.2
sdkHooks: 0.1.0
typeOverrides: 2.81.1
unions: 2.85.8
generatedFiles:
- completions.go
- sessions.go
- feedback.go
- feedbacktasks.go
- log10.go
- go.mod
- models/sdkerrors/sdkerror.go
- types/bigint.go
- types/date.go
- types/datetime.go
- types/decimal.go
- types/pointers.go
- internal/utils/contenttype.go
- internal/utils/form.go
- internal/utils/headers.go
- internal/utils/json.go
- internal/utils/pathparams.go
- internal/utils/queryparams.go
- internal/utils/requestbody.go
- internal/utils/retries.go
- internal/utils/security.go
- internal/utils/utils.go
- internal/globals/globals.go
- /models/operations/create.go
- /models/operations/update.go
- /models/operations/listungraded.go
- /models/operations/createsession.go
- /models/operations/get.go
- /models/operations/list.go
- /models/operations/upload.go
- /models/operations/listfeedbacktasks.go
- /models/operations/createfeedbacktask.go
- /models/operations/getfeedbacktask.go
- /models/components/completion.go
- /models/components/createchatcompletionresponse.go
- /models/components/completionusage.go
- /models/components/chatcompletiontokenlogprob.go
- /models/components/chatcompletionresponsemessage.go
- /models/components/chatcompletionmessagetoolcall.go
- /models/components/createchatcompletionrequest.go
- /models/components/chatcompletionfunctions.go
- /models/components/chatcompletionfunctioncalloption.go
- /models/components/chatcompletiontoolchoiceoption.go
- /models/components/chatcompletionnamedtoolchoice.go
- /models/components/chatcompletiontool.go
- /models/components/functionobject.go
- /models/components/chatcompletionstreamoptions.go
- /models/components/chatcompletionrequestmessage.go
- /models/components/chatcompletionrequestsystemmessage.go
- /models/components/chatcompletionrequestusermessage.go
- /models/components/chatcompletionrequestmessagecontentpart.go
- /models/components/chatcompletionrequestmessagecontentparttext.go
- /models/components/chatcompletionrequestmessagecontentpartimage.go
- /models/components/chatcompletionrequestassistantmessage.go
- /models/components/chatcompletionrequesttoolmessage.go
- /models/components/chatcompletionrequestfunctionmessage.go
- /models/components/httpmetadata.go
- /models/components/session.go
- /models/components/feedback.go
- /models/components/task.go
- /models/components/security.go
- docs/models/operations/createglobals.md
- docs/models/operations/createrequest.md
- docs/models/operations/createresponse.md
- docs/models/operations/updateglobals.md
- docs/models/operations/updaterequest.md
- docs/models/operations/updateresponse.md
- docs/models/operations/listungradedglobals.md
- docs/models/operations/listungradedrequest.md
- docs/models/operations/listungradedresponsebody.md
- docs/models/operations/listungradedresponse.md
- docs/models/operations/createsessionglobals.md
- docs/models/operations/createsessionrequest.md
- docs/models/operations/createsessionresponsebody.md
- docs/models/operations/createsessionresponse.md
- docs/models/operations/getglobals.md
- docs/models/operations/getrequest.md
- docs/models/operations/getresponse.md
- docs/models/operations/listglobals.md
- docs/models/operations/listrequestbody.md
- docs/models/operations/listrequest.md
- docs/models/operations/listresponsebody.md
- docs/models/operations/listresponse.md
- docs/models/operations/uploadglobals.md
- docs/models/operations/requestbodyjsonvalues.md
- docs/models/operations/two.md
- docs/models/operations/jsonvalues.md
- docs/models/operations/one.md
- docs/models/operations/uploadrequestbody.md
- docs/models/operations/uploadrequest.md
- docs/models/operations/uploadresponse.md
- docs/models/operations/listfeedbacktasksresponse.md
- docs/models/operations/createfeedbacktaskresponse.md
- docs/models/operations/getfeedbacktaskrequest.md
- docs/models/operations/getfeedbacktaskresponse.md
- docs/models/components/kind.md
- docs/models/components/status.md
- docs/models/components/stacktrace.md
- docs/models/components/completion.md
- docs/models/components/finishreason.md
- docs/models/components/logprobs.md
- docs/models/components/choices.md
- docs/models/components/object.md
- docs/models/components/createchatcompletionresponse.md
- docs/models/components/completionusage.md
- docs/models/components/toplogprobs.md
- docs/models/components/chatcompletiontokenlogprob.md
- docs/models/components/chatcompletionresponsemessagerole.md
- docs/models/components/chatcompletionresponsemessagefunctioncall.md
- docs/models/components/chatcompletionresponsemessage.md
- docs/models/components/chatcompletionmessagetoolcalltype.md
- docs/models/components/function.md
- docs/models/components/chatcompletionmessagetoolcall.md
- docs/models/components/two.md
- docs/models/components/model.md
- docs/models/components/createchatcompletionrequesttype.md
- docs/models/components/responseformat.md
- docs/models/components/stop.md
- docs/models/components/one.md
- docs/models/components/createchatcompletionrequestfunctioncall.md
- docs/models/components/createchatcompletionrequest.md
- docs/models/components/chatcompletionfunctions.md
- docs/models/components/chatcompletionfunctioncalloption.md
- docs/models/components/chatcompletiontoolchoiceoption1.md
- docs/models/components/chatcompletiontoolchoiceoption.md
- docs/models/components/chatcompletionnamedtoolchoicetype.md
- docs/models/components/chatcompletionnamedtoolchoicefunction.md
- docs/models/components/chatcompletionnamedtoolchoice.md
- docs/models/components/chatcompletiontooltype.md
- docs/models/components/chatcompletiontool.md
- docs/models/components/functionobject.md
- docs/models/components/chatcompletionstreamoptions.md
- docs/models/components/chatcompletionrequestmessage.md
- docs/models/components/role.md
- docs/models/components/chatcompletionrequestsystemmessage.md
- docs/models/components/content.md
- docs/models/components/chatcompletionrequestusermessagerole.md
- docs/models/components/chatcompletionrequestusermessage.md
- docs/models/components/chatcompletionrequestmessagecontentpart.md
- docs/models/components/type.md
- docs/models/components/chatcompletionrequestmessagecontentparttext.md
- docs/models/components/chatcompletionrequestmessagecontentpartimagetype.md
- docs/models/components/detail.md
- docs/models/components/imageurl.md
- docs/models/components/chatcompletionrequestmessagecontentpartimage.md
- docs/models/components/chatcompletionrequestassistantmessagerole.md
- docs/models/components/functioncall.md
- docs/models/components/chatcompletionrequestassistantmessage.md
- docs/models/components/chatcompletionrequesttoolmessagerole.md
- docs/models/components/chatcompletionrequesttoolmessage.md
- docs/models/components/chatcompletionrequestfunctionmessagerole.md
- docs/models/components/chatcompletionrequestfunctionmessage.md
- docs/models/components/httpmetadata.md
- docs/models/components/session.md
- docs/models/components/jsonvalues.md
- docs/models/components/feedback.md
- docs/models/components/jsonschema.md
- docs/models/components/completiontagsselector.md
- docs/models/components/task.md
- docs/models/components/security.md
- docs/sdks/log10/README.md
- docs/sdks/completions/README.md
- docs/sdks/sessions/README.md
- docs/sdks/feedback/README.md
- docs/sdks/feedbacktasks/README.md
- USAGE.md
- .gitattributes
- internal/hooks/hooks.go

33
.speakeasy/gen.yaml Executable file
View File

@@ -0,0 +1,33 @@
configVersion: 2.0.0
generation:
sdkClassName: Log10
maintainOpenAPIOrder: true
usageSnippets:
optionalPropertyRendering: withExample
useClassNamesForArrayFields: true
fixes:
nameResolutionDec2023: true
parameterOrderingFeb2024: true
requestResponseComponentNamesFeb2024: true
auth:
oAuth2ClientCredentialsEnabled: false
go:
version: 0.0.1
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
imports:
option: openapi
paths:
callbacks: models/callbacks
errors: models/sdkerrors
operations: models/operations
shared: models/components
webhooks: models/webhooks
inputModelSuffix: input
maxMethodParams: 4
methodArguments: require-security-and-request
outputModelSuffix: output
packageName: github.com/log10-io/log10go
responseFormat: envelope-http

28
.speakeasy/workflow.lock Normal file
View File

@@ -0,0 +1,28 @@
speakeasyVersion: 1.296.1
sources:
default:
sourceNamespace: default
sourceRevisionDigest: sha256:e13d61f8be0f7ff07045d20f2e0671b5c93c2f2f185d768d991ab68ca99760e0
sourceBlobDigest: sha256:7811f9a53e442babdafdc93fd2ec222a80fe0a260d6dfc2603b48c0aa05350db
tags:
- latest
targets:
my-first-target:
source: default
sourceNamespace: default
sourceRevisionDigest: sha256:e13d61f8be0f7ff07045d20f2e0671b5c93c2f2f185d768d991ab68ca99760e0
sourceBlobDigest: sha256:7811f9a53e442babdafdc93fd2ec222a80fe0a260d6dfc2603b48c0aa05350db
outLocation: /Users/niklasqnielsen/workspace/log10/log10go
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
default:
inputs:
- location: openapi.yaml
registry:
location: registry.speakeasyapi.dev/log10/log10/default
targets:
my-first-target:
target: go
source: default

12
.speakeasy/workflow.yaml Normal file
View File

@@ -0,0 +1,12 @@
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
default:
inputs:
- location: openapi.yaml
registry:
location: registry.speakeasyapi.dev/log10/log10/default
targets:
my-first-target:
target: go
source: default

3
Makefile Normal file
View File

@@ -0,0 +1,3 @@
download_specs:
wget -q https://raw.githubusercontent.com/log10-io/openapi/main/openapi.yaml -O openapi.yaml
wget -q https://raw.githubusercontent.com/log10-io/openapi/main/openai.yaml -O openai.yaml

464
README.md Normal file
View File

@@ -0,0 +1,464 @@
# github.com/log10-io/log10go
<div align="left">
<a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
</a>
</div>
## 🏗 **Welcome to your new SDK!** 🏗
It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:
- [ ] 🛠 Make your SDK feel handcrafted by [customizing it](https://www.speakeasyapi.dev/docs/customize-sdks)
- [ ] ♻️ Refine your SDK quickly by iterating locally with the [Speakeasy CLI](https://github.com/speakeasy-api/speakeasy)
- [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasyapi.dev/docs/advanced-setup/publish-sdks)
- [ ] ✨ When ready to productionize, delete this section from the README
<!-- Start SDK Installation [installation] -->
## SDK Installation
```bash
go get github.com/log10-io/log10go
```
<!-- End SDK Installation [installation] -->
<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage
### Example
```go
package main
import (
"context"
"github.com/log10-io/log10go"
"log"
)
func main() {
s := log10go.New(
log10go.WithSecurity("<YOUR_API_KEY_HERE>"),
log10go.WithXLog10Organization("<value>"),
)
var xLog10Organization *string = log10go.String("<value>")
ctx := context.Background()
res, err := s.Sessions.Create(ctx, xLog10Organization)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
```
<!-- End SDK Example Usage [usage] -->
<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations
### [Completions](docs/sdks/completions/README.md)
* [Create](docs/sdks/completions/README.md#create) - Create a completion
* [Update](docs/sdks/completions/README.md#update) - Update completion by id.
* [ListUngraded](docs/sdks/completions/README.md#listungraded) - List ungraded completions i.e. completions that have not been associated with feedback but matches task selector.
### [Sessions](docs/sdks/sessions/README.md)
* [Create](docs/sdks/sessions/README.md#create) - Create a session
### [Feedback](docs/sdks/feedback/README.md)
* [Get](docs/sdks/feedback/README.md#get) - Fetch feedback by id.
* [List](docs/sdks/feedback/README.md#list) - List feedback
* [Upload](docs/sdks/feedback/README.md#upload) - Upload a piece of feedback
### [FeedbackTasks](docs/sdks/feedbacktasks/README.md)
* [List](docs/sdks/feedbacktasks/README.md#list) - List feedback tasks.
* [Create](docs/sdks/feedbacktasks/README.md#create) - Create a new task.
* [Get](docs/sdks/feedbacktasks/README.md#get) - Retrieves feedback task `taskId`.
<!-- End Available Resources and Operations [operations] -->
<!-- Start Global Parameters [global-parameters] -->
## Global Parameters
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
For example, you can set `X-Log10-Organization` to `"<value>"` at SDK initialization and then you do not have to pass the same value on calls to operations like `Update`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
### Available Globals
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
| Name | Type | Required | Description |
| ---- | ---- |:--------:| ----------- |
| XLog10Organization | string | ✔️ | The XLog10Organization parameter. |
### Example
```go
package main
import (
"context"
"github.com/log10-io/log10go"
"github.com/log10-io/log10go/models/components"
"log"
)
func main() {
s := log10go.New(
log10go.WithSecurity("<YOUR_API_KEY_HERE>"),
log10go.WithXLog10Organization("<value>"),
)
var completionID string = "<value>"
completion := components.Completion{
OrganizationID: "<value>",
Request: &components.CreateChatCompletionRequest{
Messages: []components.ChatCompletionRequestMessage{
components.CreateChatCompletionRequestMessageChatCompletionRequestFunctionMessage(
components.ChatCompletionRequestFunctionMessage{
Role: components.ChatCompletionRequestFunctionMessageRoleFunction,
Content: "<value>",
Name: "<value>",
},
),
},
Model: components.CreateModelTwo(
components.TwoGpt4Turbo,
),
N: log10go.Int64(1),
ResponseFormat: &components.ResponseFormat{
Type: components.CreateChatCompletionRequestTypeJSONObject.ToPointer(),
},
Temperature: log10go.Float64(1),
TopP: log10go.Float64(1),
User: log10go.String("user-1234"),
},
}
var xLog10Organization *string = log10go.String("<value>")
ctx := context.Background()
res, err := s.Completions.Update(ctx, completionID, completion, xLog10Organization)
if err != nil {
log.Fatal(err)
}
if res.Completion != nil {
// handle response
}
}
```
<!-- End Global Parameters [global-parameters] -->
<!-- Start Error Handling [errors] -->
## Error Handling
Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass.
| Error Object | Status Code | Content Type |
| ------------------ | ------------------ | ------------------ |
| sdkerrors.SDKError | 4xx-5xx | */* |
### Example
```go
package main
import (
"context"
"errors"
"github.com/log10-io/log10go"
"github.com/log10-io/log10go/models/components"
"github.com/log10-io/log10go/models/sdkerrors"
"log"
)
func main() {
s := log10go.New(
log10go.WithSecurity("<YOUR_API_KEY_HERE>"),
log10go.WithXLog10Organization("<value>"),
)
completion := components.Completion{
OrganizationID: "<value>",
Request: &components.CreateChatCompletionRequest{
Messages: []components.ChatCompletionRequestMessage{
components.CreateChatCompletionRequestMessageChatCompletionRequestAssistantMessage(
components.ChatCompletionRequestAssistantMessage{
Role: components.ChatCompletionRequestAssistantMessageRoleAssistant,
},
),
},
Model: components.CreateModelTwo(
components.TwoGpt4Turbo,
),
N: log10go.Int64(1),
ResponseFormat: &components.ResponseFormat{
Type: components.CreateChatCompletionRequestTypeJSONObject.ToPointer(),
},
Temperature: log10go.Float64(1),
TopP: log10go.Float64(1),
User: log10go.String("user-1234"),
},
}
var xLog10Organization *string = log10go.String("<value>")
ctx := context.Background()
res, err := s.Completions.Create(ctx, completion, xLog10Organization)
if err != nil {
var e *sdkerrors.SDKError
if errors.As(err, &e) {
// handle error
log.Fatal(e.Error())
}
}
}
```
<!-- End Error Handling [errors] -->
<!-- Start Server Selection [server] -->
## Server Selection
### Select Server by Index
You can override the default server globally using the `WithServerIndex` option when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
| # | Server | Variables |
| - | ------ | --------- |
| 0 | `https://log10.io` | None |
#### Example
```go
package main
import (
"context"
"github.com/log10-io/log10go"
"github.com/log10-io/log10go/models/components"
"log"
)
func main() {
s := log10go.New(
log10go.WithServerIndex(0),
log10go.WithSecurity("<YOUR_API_KEY_HERE>"),
log10go.WithXLog10Organization("<value>"),
)
completion := components.Completion{
OrganizationID: "<value>",
Request: &components.CreateChatCompletionRequest{
Messages: []components.ChatCompletionRequestMessage{
components.CreateChatCompletionRequestMessageChatCompletionRequestAssistantMessage(
components.ChatCompletionRequestAssistantMessage{
Role: components.ChatCompletionRequestAssistantMessageRoleAssistant,
},
),
},
Model: components.CreateModelTwo(
components.TwoGpt4Turbo,
),
N: log10go.Int64(1),
ResponseFormat: &components.ResponseFormat{
Type: components.CreateChatCompletionRequestTypeJSONObject.ToPointer(),
},
Temperature: log10go.Float64(1),
TopP: log10go.Float64(1),
User: log10go.String("user-1234"),
},
}
var xLog10Organization *string = log10go.String("<value>")
ctx := context.Background()
res, err := s.Completions.Create(ctx, completion, xLog10Organization)
if err != nil {
log.Fatal(err)
}
if res.Any != nil {
// handle response
}
}
```
### Override Server URL Per-Client
The default server can also be overridden globally using the `WithServerURL` option when initializing the SDK client instance. For example:
```go
package main
import (
"context"
"github.com/log10-io/log10go"
"github.com/log10-io/log10go/models/components"
"log"
)
func main() {
s := log10go.New(
log10go.WithServerURL("https://log10.io"),
log10go.WithSecurity("<YOUR_API_KEY_HERE>"),
log10go.WithXLog10Organization("<value>"),
)
completion := components.Completion{
OrganizationID: "<value>",
Request: &components.CreateChatCompletionRequest{
Messages: []components.ChatCompletionRequestMessage{
components.CreateChatCompletionRequestMessageChatCompletionRequestAssistantMessage(
components.ChatCompletionRequestAssistantMessage{
Role: components.ChatCompletionRequestAssistantMessageRoleAssistant,
},
),
},
Model: components.CreateModelTwo(
components.TwoGpt4Turbo,
),
N: log10go.Int64(1),
ResponseFormat: &components.ResponseFormat{
Type: components.CreateChatCompletionRequestTypeJSONObject.ToPointer(),
},
Temperature: log10go.Float64(1),
TopP: log10go.Float64(1),
User: log10go.String("user-1234"),
},
}
var xLog10Organization *string = log10go.String("<value>")
ctx := context.Background()
res, err := s.Completions.Create(ctx, completion, xLog10Organization)
if err != nil {
log.Fatal(err)
}
if res.Any != nil {
// handle response
}
}
```
<!-- End Server Selection [server] -->
<!-- Start Custom HTTP Client [http-client] -->
## Custom HTTP Client
The Go SDK makes API calls that wrap an internal HTTP client. The requirements for the HTTP client are very simple. It must match this interface:
```go
type HTTPClient interface {
Do(req *http.Request) (*http.Response, error)
}
```
The built-in `net/http` client satisfies this interface and a default client based on the built-in is provided by default. To replace this default with a client of your own, you can implement this interface yourself or provide your own client configured as desired. Here's a simple example, which adds a client with a 30 second timeout.
```go
import (
"net/http"
"time"
"github.com/myorg/your-go-sdk"
)
var (
httpClient = &http.Client{Timeout: 30 * time.Second}
sdkClient = sdk.New(sdk.WithClient(httpClient))
)
```
This can be a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration.
<!-- End Custom HTTP Client [http-client] -->
<!-- Start Authentication [security] -->
## Authentication
### Per-Client Security Schemes
This SDK supports the following security scheme globally:
| Name | Type | Scheme |
| ------------ | ------------ | ------------ |
| `Log10Token` | apiKey | API key |
You can configure it using the `WithSecurity` option when initializing the SDK client instance. For example:
```go
package main
import (
"context"
"github.com/log10-io/log10go"
"github.com/log10-io/log10go/models/components"
"log"
)
func main() {
s := log10go.New(
log10go.WithSecurity("<YOUR_API_KEY_HERE>"),
log10go.WithXLog10Organization("<value>"),
)
completion := components.Completion{
OrganizationID: "<value>",
Request: &components.CreateChatCompletionRequest{
Messages: []components.ChatCompletionRequestMessage{
components.CreateChatCompletionRequestMessageChatCompletionRequestAssistantMessage(
components.ChatCompletionRequestAssistantMessage{
Role: components.ChatCompletionRequestAssistantMessageRoleAssistant,
},
),
},
Model: components.CreateModelTwo(
components.TwoGpt4Turbo,
),
N: log10go.Int64(1),
ResponseFormat: &components.ResponseFormat{
Type: components.CreateChatCompletionRequestTypeJSONObject.ToPointer(),
},
Temperature: log10go.Float64(1),
TopP: log10go.Float64(1),
User: log10go.String("user-1234"),
},
}
var xLog10Organization *string = log10go.String("<value>")
ctx := context.Background()
res, err := s.Completions.Create(ctx, completion, xLog10Organization)
if err != nil {
log.Fatal(err)
}
if res.Any != nil {
// handle response
}
}
```
<!-- End Authentication [security] -->
<!-- Start Special Types [types] -->
## Special Types
<!-- End Special Types [types] -->
<!-- Placeholder for Future Speakeasy SDK Sections -->
# Development
## Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.
## Contributions
While we value open-source contributions to this SDK, this library is generated programmatically.
Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!
### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)

28
USAGE.md Normal file
View File

@@ -0,0 +1,28 @@
<!-- Start SDK Example Usage [usage] -->
```go
package main
import (
"context"
"github.com/log10-io/log10go"
"log"
)
func main() {
s := log10go.New(
log10go.WithSecurity("<YOUR_API_KEY_HERE>"),
log10go.WithXLog10Organization("<value>"),
)
var xLog10Organization *string = log10go.String("<value>")
ctx := context.Background()
res, err := s.Sessions.Create(ctx, xLog10Organization)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
```
<!-- End SDK Example Usage [usage] -->

375
completions.go Normal file
View File

@@ -0,0 +1,375 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package log10go
import (
"bytes"
"context"
"fmt"
"github.com/log10-io/log10go/internal/hooks"
"github.com/log10-io/log10go/internal/utils"
"github.com/log10-io/log10go/models/components"
"github.com/log10-io/log10go/models/operations"
"github.com/log10-io/log10go/models/sdkerrors"
"io"
"net/http"
)
// Completions
type Completions struct {
sdkConfiguration sdkConfiguration
}
func newCompletions(sdkConfig sdkConfiguration) *Completions {
return &Completions{
sdkConfiguration: sdkConfig,
}
}
// Create a completion
func (s *Completions) Create(ctx context.Context, completion components.Completion, xLog10Organization *string) (*operations.CreateResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "create",
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.CreateRequest{
XLog10Organization: xLog10Organization,
Completion: completion,
}
globals := operations.CreateGlobals{
XLog10Organization: s.sdkConfiguration.Globals.XLog10Organization,
}
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/completions", request, globals)
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Completion", "json", `request:"mediaType=application/json"`)
if err != nil {
return nil, err
}
req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
req.Header.Set("Content-Type", reqContentType)
utils.PopulateHeaders(ctx, req, request, globals)
if err := utils.PopulateQueryParams(ctx, req, request, globals); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
res := &operations.CreateResponse{
HTTPMeta: components.HTTPMetadata{
Request: req,
Response: httpRes,
},
}
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
switch {
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
var out any
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.Any = out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 201:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
var out components.Completion
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.Completion = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}
// Update completion by id.
func (s *Completions) Update(ctx context.Context, completionID string, completion components.Completion, xLog10Organization *string) (*operations.UpdateResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "update",
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.UpdateRequest{
CompletionID: completionID,
XLog10Organization: xLog10Organization,
Completion: completion,
}
globals := operations.UpdateGlobals{
XLog10Organization: s.sdkConfiguration.Globals.XLog10Organization,
}
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/completions/{completionId}", request, globals)
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Completion", "json", `request:"mediaType=application/json"`)
if err != nil {
return nil, err
}
req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
req.Header.Set("Content-Type", reqContentType)
utils.PopulateHeaders(ctx, req, request, globals)
if err := utils.PopulateQueryParams(ctx, req, request, globals); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
res := &operations.UpdateResponse{
HTTPMeta: components.HTTPMetadata{
Request: req,
Response: httpRes,
},
}
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
switch {
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
var out components.Completion
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.Completion = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}
// ListUngraded - List ungraded completions i.e. completions that have not been associated with feedback but matches task selector.
func (s *Completions) ListUngraded(ctx context.Context, xLog10Organization *string) (*operations.ListUngradedResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "listUngraded",
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.ListUngradedRequest{
XLog10Organization: xLog10Organization,
}
globals := operations.ListUngradedGlobals{
XLog10Organization: s.sdkConfiguration.Globals.XLog10Organization,
}
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
opURL, err := utils.GenerateURL(ctx, baseURL, "/api/v1/completions/ungraded", request, globals)
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
utils.PopulateHeaders(ctx, req, request, globals)
if err := utils.PopulateQueryParams(ctx, req, request, globals); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
return nil, err
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
httpRes, err := s.sdkConfiguration.Client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
err = fmt.Errorf("error sending request: %w", err)
} else {
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) {
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
} else if _httpRes != nil {
httpRes = _httpRes
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
}
res := &operations.ListUngradedResponse{
HTTPMeta: components.HTTPMetadata{
Request: req,
Response: httpRes,
},
}
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
switch {
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
var out operations.ListUngradedResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.Object = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500:
fallthrough
case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600:
return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes)
default:
return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
}
return res, nil
}

View File

@@ -0,0 +1,11 @@
# ChatCompletionFunctionCallOption
Specifying a particular function via `{"name": "my_function"}` forces the model to call that function.
## Fields
| Field | Type | Required | Description |
| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
| `Name` | *string* | :heavy_check_mark: | The name of the function to call. |

View File

@@ -0,0 +1,12 @@
# ~~ChatCompletionFunctions~~
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Description` | **string* | :heavy_minus_sign: | A description of what the function does, used by the model to choose when and how to call the function. |
| `Name` | *string* | :heavy_check_mark: | The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. |
| `Parameters` | map[string]*any* | :heavy_minus_sign: | The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. <br/><br/>Omitting `parameters` defines a function with an empty parameter list. |

View File

@@ -0,0 +1,10 @@
# ChatCompletionMessageToolCall
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `ID` | *string* | :heavy_check_mark: | The ID of the tool call. |
| `Type` | [components.ChatCompletionMessageToolCallType](../../models/components/chatcompletionmessagetoolcalltype.md) | :heavy_check_mark: | The type of the tool. Currently, only `function` is supported. |
| `Function` | [components.Function](../../models/components/function.md) | :heavy_check_mark: | The function that the model called. |

View File

@@ -0,0 +1,10 @@
# ChatCompletionMessageToolCallType
The type of the tool. Currently, only `function` is supported.
## Values
| Name | Value |
| ------------------------------------------- | ------------------------------------------- |
| `ChatCompletionMessageToolCallTypeFunction` | function |

View File

@@ -0,0 +1,11 @@
# ChatCompletionNamedToolChoice
Specifies a tool the model should use. Use to force the model to call a specific function.
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `Type` | [components.ChatCompletionNamedToolChoiceType](../../models/components/chatcompletionnamedtoolchoicetype.md) | :heavy_check_mark: | The type of the tool. Currently, only `function` is supported. |
| `Function` | [components.ChatCompletionNamedToolChoiceFunction](../../models/components/chatcompletionnamedtoolchoicefunction.md) | :heavy_check_mark: | N/A |

View File

@@ -0,0 +1,8 @@
# ChatCompletionNamedToolChoiceFunction
## Fields
| Field | Type | Required | Description |
| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
| `Name` | *string* | :heavy_check_mark: | The name of the function to call. |

View File

@@ -0,0 +1,10 @@
# ChatCompletionNamedToolChoiceType
The type of the tool. Currently, only `function` is supported.
## Values
| Name | Value |
| ------------------------------------------- | ------------------------------------------- |
| `ChatCompletionNamedToolChoiceTypeFunction` | function |

View File

@@ -0,0 +1,12 @@
# ChatCompletionRequestAssistantMessage
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Content` | **string* | :heavy_minus_sign: | The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.<br/> |
| `Role` | [components.ChatCompletionRequestAssistantMessageRole](../../models/components/chatcompletionrequestassistantmessagerole.md) | :heavy_check_mark: | The role of the messages author, in this case `assistant`. |
| `Name` | **string* | :heavy_minus_sign: | An optional name for the participant. Provides the model information to differentiate between participants of the same role. |
| `ToolCalls` | [][components.ChatCompletionMessageToolCall](../../models/components/chatcompletionmessagetoolcall.md) | :heavy_minus_sign: | The tool calls generated by the model, such as function calls. |
| ~~`FunctionCall`~~ | [*components.FunctionCall](../../models/components/functioncall.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. |

View File

@@ -0,0 +1,10 @@
# ChatCompletionRequestAssistantMessageRole
The role of the messages author, in this case `assistant`.
## Values
| Name | Value |
| ---------------------------------------------------- | ---------------------------------------------------- |
| `ChatCompletionRequestAssistantMessageRoleAssistant` | assistant |

View File

@@ -0,0 +1,12 @@
# ~~ChatCompletionRequestFunctionMessage~~
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `Role` | [components.ChatCompletionRequestFunctionMessageRole](../../models/components/chatcompletionrequestfunctionmessagerole.md) | :heavy_check_mark: | The role of the messages author, in this case `function`. |
| `Content` | *string* | :heavy_check_mark: | The contents of the function message. |
| `Name` | *string* | :heavy_check_mark: | The name of the function to call. |

View File

@@ -0,0 +1,10 @@
# ChatCompletionRequestFunctionMessageRole
The role of the messages author, in this case `function`.
## Values
| Name | Value |
| -------------------------------------------------- | -------------------------------------------------- |
| `ChatCompletionRequestFunctionMessageRoleFunction` | function |

View File

@@ -0,0 +1,35 @@
# ChatCompletionRequestMessage
## Supported Types
### ChatCompletionRequestSystemMessage
```go
chatCompletionRequestMessage := components.CreateChatCompletionRequestMessageChatCompletionRequestSystemMessage(components.ChatCompletionRequestSystemMessage{/* values here */})
```
### ChatCompletionRequestUserMessage
```go
chatCompletionRequestMessage := components.CreateChatCompletionRequestMessageChatCompletionRequestUserMessage(components.ChatCompletionRequestUserMessage{/* values here */})
```
### ChatCompletionRequestAssistantMessage
```go
chatCompletionRequestMessage := components.CreateChatCompletionRequestMessageChatCompletionRequestAssistantMessage(components.ChatCompletionRequestAssistantMessage{/* values here */})
```
### ChatCompletionRequestToolMessage
```go
chatCompletionRequestMessage := components.CreateChatCompletionRequestMessageChatCompletionRequestToolMessage(components.ChatCompletionRequestToolMessage{/* values here */})
```
### ChatCompletionRequestFunctionMessage
```go
chatCompletionRequestMessage := components.CreateChatCompletionRequestMessageChatCompletionRequestFunctionMessage(components.ChatCompletionRequestFunctionMessage{/* values here */})
```

View File

@@ -0,0 +1,17 @@
# ChatCompletionRequestMessageContentPart
## Supported Types
### ChatCompletionRequestMessageContentPartText
```go
chatCompletionRequestMessageContentPart := components.CreateChatCompletionRequestMessageContentPartChatCompletionRequestMessageContentPartText(components.ChatCompletionRequestMessageContentPartText{/* values here */})
```
### ChatCompletionRequestMessageContentPartImage
```go
chatCompletionRequestMessageContentPart := components.CreateChatCompletionRequestMessageContentPartChatCompletionRequestMessageContentPartImage(components.ChatCompletionRequestMessageContentPartImage{/* values here */})
```

View File

@@ -0,0 +1,9 @@
# ChatCompletionRequestMessageContentPartImage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `Type` | [components.ChatCompletionRequestMessageContentPartImageType](../../models/components/chatcompletionrequestmessagecontentpartimagetype.md) | :heavy_check_mark: | The type of the content part. |
| `ImageURL` | [components.ImageURL](../../models/components/imageurl.md) | :heavy_check_mark: | N/A |

View File

@@ -0,0 +1,10 @@
# ChatCompletionRequestMessageContentPartImageType
The type of the content part.
## Values
| Name | Value |
| ---------------------------------------------------------- | ---------------------------------------------------------- |
| `ChatCompletionRequestMessageContentPartImageTypeImageURL` | image_url |

View File

@@ -0,0 +1,9 @@
# ChatCompletionRequestMessageContentPartText
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `Type` | [components.Type](../../models/components/type.md) | :heavy_check_mark: | The type of the content part. |
| `Text` | *string* | :heavy_check_mark: | The text content. |

View File

@@ -0,0 +1,10 @@
# ChatCompletionRequestSystemMessage
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `Content` | *string* | :heavy_check_mark: | The contents of the system message. |
| `Role` | [components.Role](../../models/components/role.md) | :heavy_check_mark: | The role of the messages author, in this case `system`. |
| `Name` | **string* | :heavy_minus_sign: | An optional name for the participant. Provides the model information to differentiate between participants of the same role. |

View File

@@ -0,0 +1,10 @@
# ChatCompletionRequestToolMessage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `Role` | [components.ChatCompletionRequestToolMessageRole](../../models/components/chatcompletionrequesttoolmessagerole.md) | :heavy_check_mark: | The role of the messages author, in this case `tool`. |
| `Content` | *string* | :heavy_check_mark: | The contents of the tool message. |
| `ToolCallID` | *string* | :heavy_check_mark: | Tool call that this message is responding to. |

View File

@@ -0,0 +1,10 @@
# ChatCompletionRequestToolMessageRole
The role of the messages author, in this case `tool`.
## Values
| Name | Value |
| ------------------------------------------ | ------------------------------------------ |
| `ChatCompletionRequestToolMessageRoleTool` | tool |

View File

@@ -0,0 +1,10 @@
# ChatCompletionRequestUserMessage
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `Content` | [components.Content](../../models/components/content.md) | :heavy_check_mark: | The contents of the user message.<br/> |
| `Role` | [components.ChatCompletionRequestUserMessageRole](../../models/components/chatcompletionrequestusermessagerole.md) | :heavy_check_mark: | The role of the messages author, in this case `user`. |
| `Name` | **string* | :heavy_minus_sign: | An optional name for the participant. Provides the model information to differentiate between participants of the same role. |

View File

@@ -0,0 +1,10 @@
# ChatCompletionRequestUserMessageRole
The role of the messages author, in this case `user`.
## Values
| Name | Value |
| ------------------------------------------ | ------------------------------------------ |
| `ChatCompletionRequestUserMessageRoleUser` | user |

View File

@@ -0,0 +1,13 @@
# ChatCompletionResponseMessage
A chat completion message generated by the model.
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Content` | *string* | :heavy_check_mark: | The contents of the message. |
| `ToolCalls` | [][components.ChatCompletionMessageToolCall](../../models/components/chatcompletionmessagetoolcall.md) | :heavy_minus_sign: | The tool calls generated by the model, such as function calls. |
| `Role` | [components.ChatCompletionResponseMessageRole](../../models/components/chatcompletionresponsemessagerole.md) | :heavy_check_mark: | The role of the author of this message. |
| ~~`FunctionCall`~~ | [*components.ChatCompletionResponseMessageFunctionCall](../../models/components/chatcompletionresponsemessagefunctioncall.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. |

View File

@@ -0,0 +1,13 @@
# ~~ChatCompletionResponseMessageFunctionCall~~
Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Arguments` | *string* | :heavy_check_mark: | The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. |
| `Name` | *string* | :heavy_check_mark: | The name of the function to call. |

View File

@@ -0,0 +1,10 @@
# ChatCompletionResponseMessageRole
The role of the author of this message.
## Values
| Name | Value |
| -------------------------------------------- | -------------------------------------------- |
| `ChatCompletionResponseMessageRoleAssistant` | assistant |

View File

@@ -0,0 +1,11 @@
# ChatCompletionStreamOptions
Options for streaming response. Only set this when you set `stream: true`.
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `IncludeUsage` | **bool* | :heavy_minus_sign: | If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.<br/> |

View File

@@ -0,0 +1,11 @@
# ChatCompletionTokenLogprob
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Token` | *string* | :heavy_check_mark: | The token. |
| `Logprob` | *float64* | :heavy_check_mark: | 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. |
| `Bytes` | []*int64* | :heavy_check_mark: | 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. |
| `TopLogprobs` | [][components.TopLogprobs](../../models/components/toplogprobs.md) | :heavy_check_mark: | 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 `top_logprobs` returned. |

View File

@@ -0,0 +1,9 @@
# ChatCompletionTool
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `Type` | [components.ChatCompletionToolType](../../models/components/chatcompletiontooltype.md) | :heavy_check_mark: | The type of the tool. Currently, only `function` is supported. |
| `Function` | [components.FunctionObject](../../models/components/functionobject.md) | :heavy_check_mark: | N/A |

View File

@@ -0,0 +1,26 @@
# ChatCompletionToolChoiceOption
Controls which (if any) tool is called by the model.
`none` means the model will not call any tool and instead generates a message.
`auto` means the model can pick between generating a message or calling one or more tools.
`required` means the model must call one or more tools.
Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
`none` is the default when no tools are present. `auto` is the default if tools are present.
## Supported Types
### ChatCompletionToolChoiceOption1
```go
chatCompletionToolChoiceOption := components.CreateChatCompletionToolChoiceOptionChatCompletionToolChoiceOption1(components.ChatCompletionToolChoiceOption1{/* values here */})
```
### ChatCompletionNamedToolChoice
```go
chatCompletionToolChoiceOption := components.CreateChatCompletionToolChoiceOptionChatCompletionNamedToolChoice(components.ChatCompletionNamedToolChoice{/* values here */})
```

View File

@@ -0,0 +1,13 @@
# ChatCompletionToolChoiceOption1
`none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools.
## Values
| Name | Value |
| ----------------------------------------- | ----------------------------------------- |
| `ChatCompletionToolChoiceOption1None` | none |
| `ChatCompletionToolChoiceOption1Auto` | auto |
| `ChatCompletionToolChoiceOption1Required` | required |

View File

@@ -0,0 +1,10 @@
# ChatCompletionToolType
The type of the tool. Currently, only `function` is supported.
## Values
| Name | Value |
| -------------------------------- | -------------------------------- |
| `ChatCompletionToolTypeFunction` | function |

View File

@@ -0,0 +1,11 @@
# Choices
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `FinishReason` | [components.FinishReason](../../models/components/finishreason.md) | :heavy_check_mark: | The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,<br/>`length` if the maximum number of tokens specified in the request was reached,<br/>`content_filter` if content was omitted due to a flag from our content filters,<br/>`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.<br/> |
| `Index` | *int64* | :heavy_check_mark: | The index of the choice in the list of choices. |
| `Message` | [components.ChatCompletionResponseMessage](../../models/components/chatcompletionresponsemessage.md) | :heavy_check_mark: | A chat completion message generated by the model. |
| `Logprobs` | [components.Logprobs](../../models/components/logprobs.md) | :heavy_check_mark: | Log probability information for the choice. |

View File

@@ -0,0 +1,19 @@
# Completion
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `ID` | **string* | :heavy_minus_sign: | The unique identifier for this task. |
| `OrganizationID` | *string* | :heavy_check_mark: | The unique identifier for the organization. |
| `Kind` | [*components.Kind](../../models/components/kind.md) | :heavy_minus_sign: | The kind of completion i.e. chat messages or prompt |
| `Status` | [*components.Status](../../models/components/status.md) | :heavy_minus_sign: | The status of this completion. |
| `Tags` | []*string* | :heavy_minus_sign: | The tags for this completion. |
| `Request` | [*components.CreateChatCompletionRequest](../../models/components/createchatcompletionrequest.md) | :heavy_minus_sign: | N/A |
| `Response` | [*components.CreateChatCompletionResponse](../../models/components/createchatcompletionresponse.md) | :heavy_minus_sign: | Represents a chat completion response returned by model, based on the provided input. |
| `Stacktrace` | [][components.Stacktrace](../../models/components/stacktrace.md) | :heavy_minus_sign: | The stacktrace for this completion. |
| `SessionID` | **string* | :heavy_minus_sign: | The session id for this completion. |
| `Duration` | **float64* | :heavy_minus_sign: | The duration of this completion in seconds. |
| `FailureKind` | **string* | :heavy_minus_sign: | The failure kind of this completion. |
| `FailureReason` | **string* | :heavy_minus_sign: | The failure reason of this completion. |

View File

@@ -0,0 +1,9 @@
# CompletionTagsSelector
The completion tag matching with this task i.e. surfaced as needing feedback.
## Fields
| Field | Type | Required | Description |
| ----------- | ----------- | ----------- | ----------- |

View File

@@ -0,0 +1,12 @@
# CompletionUsage
Usage statistics for the completion request.
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- |
| `CompletionTokens` | *int64* | :heavy_check_mark: | Number of tokens in the generated completion. |
| `PromptTokens` | *int64* | :heavy_check_mark: | Number of tokens in the prompt. |
| `TotalTokens` | *int64* | :heavy_check_mark: | Total number of tokens used in the request (prompt + completion). |

View File

@@ -0,0 +1,20 @@
# Content
The contents of the user message.
## Supported Types
###
```go
content := components.CreateContentStr(string{/* values here */})
```
###
```go
content := components.CreateContentArrayOfChatCompletionRequestMessageContentPart([]components.ChatCompletionRequestMessageContentPart{/* values here */})
```

View File

@@ -0,0 +1,28 @@
# CreateChatCompletionRequest
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Messages` | [][components.ChatCompletionRequestMessage](../../models/components/chatcompletionrequestmessage.md) | :heavy_check_mark: | A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models). | |
| `Model` | [components.Model](../../models/components/model.md) | :heavy_check_mark: | ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API. | gpt-4-turbo |
| `FrequencyPenalty` | **float64* | :heavy_minus_sign: | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.<br/><br/>[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)<br/> | |
| `LogitBias` | map[string]*int64* | :heavy_minus_sign: | Modify the likelihood of specified tokens appearing in the completion.<br/><br/>Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.<br/> | |
| `Logprobs` | **bool* | :heavy_minus_sign: | Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`. | |
| `TopLogprobs` | **int64* | :heavy_minus_sign: | An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used. | |
| `MaxTokens` | **int64* | :heavy_minus_sign: | The maximum number of [tokens](/tokenizer) that can be generated in the chat completion.<br/><br/>The total length of input tokens and generated tokens is limited by the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.<br/> | |
| `N` | **int64* | :heavy_minus_sign: | How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs. | 1 |
| `PresencePenalty` | **float64* | :heavy_minus_sign: | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.<br/><br/>[See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)<br/> | |
| `ResponseFormat` | [*components.ResponseFormat](../../models/components/responseformat.md) | :heavy_minus_sign: | An object specifying the format that the model must output. Compatible with [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.<br/><br/>Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.<br/><br/>**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.<br/> | |
| `Seed` | **int64* | :heavy_minus_sign: | This feature is in Beta.<br/>If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.<br/>Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.<br/> | |
| `Stop` | [*components.Stop](../../models/components/stop.md) | :heavy_minus_sign: | Up to 4 sequences where the API will stop generating further tokens.<br/> | |
| `Stream` | **bool* | :heavy_minus_sign: | If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).<br/> | |
| `StreamOptions` | [*components.ChatCompletionStreamOptions](../../models/components/chatcompletionstreamoptions.md) | :heavy_minus_sign: | Options for streaming response. Only set this when you set `stream: true`.<br/> | |
| `Temperature` | **float64* | :heavy_minus_sign: | 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.<br/><br/>We generally recommend altering this or `top_p` but not both.<br/> | 1 |
| `TopP` | **float64* | :heavy_minus_sign: | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.<br/><br/>We generally recommend altering this or `temperature` but not both.<br/> | 1 |
| `Tools` | [][components.ChatCompletionTool](../../models/components/chatcompletiontool.md) | :heavy_minus_sign: | A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.<br/> | |
| `ToolChoice` | [*components.ChatCompletionToolChoiceOption](../../models/components/chatcompletiontoolchoiceoption.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model.<br/>`none` means the model will not call any tool and instead generates a message.<br/>`auto` means the model can pick between generating a message or calling one or more tools.<br/>`required` means the model must call one or more tools.<br/>Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.<br/><br/>`none` is the default when no tools are present. `auto` is the default if tools are present.<br/> | |
| `User` | **string* | :heavy_minus_sign: | A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).<br/> | user-1234 |
| ~~`FunctionCall`~~ | [*components.CreateChatCompletionRequestFunctionCall](../../models/components/createchatcompletionrequestfunctioncall.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>Deprecated in favor of `tool_choice`.<br/><br/>Controls which (if any) function is called by the model.<br/>`none` means the model will not call a function and instead generates a message.<br/>`auto` means the model can pick between generating a message or calling a function.<br/>Specifying a particular function via `{"name": "my_function"}` forces the model to call that function.<br/><br/>`none` is the default when no functions are present. `auto` is the default if functions are present.<br/> | |
| ~~`Functions`~~ | [][components.ChatCompletionFunctions](../../models/components/chatcompletionfunctions.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>Deprecated in favor of `tools`.<br/><br/>A list of functions the model may generate JSON inputs for.<br/> | |

View File

@@ -0,0 +1,29 @@
# ~~CreateChatCompletionRequestFunctionCall~~
Deprecated in favor of `tool_choice`.
Controls which (if any) function is called by the model.
`none` means the model will not call a function and instead generates a message.
`auto` means the model can pick between generating a message or calling a function.
Specifying a particular function via `{"name": "my_function"}` forces the model to call that function.
`none` is the default when no functions are present. `auto` is the default if functions are present.
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
## Supported Types
### One
```go
createChatCompletionRequestFunctionCall := components.CreateCreateChatCompletionRequestFunctionCallOne(components.One{/* values here */})
```
### ChatCompletionFunctionCallOption
```go
createChatCompletionRequestFunctionCall := components.CreateCreateChatCompletionRequestFunctionCallChatCompletionFunctionCallOption(components.ChatCompletionFunctionCallOption{/* values here */})
```

View File

@@ -0,0 +1,11 @@
# CreateChatCompletionRequestType
Must be one of `text` or `json_object`.
## Values
| Name | Value |
| ------------------------------------------- | ------------------------------------------- |
| `CreateChatCompletionRequestTypeText` | text |
| `CreateChatCompletionRequestTypeJSONObject` | json_object |

View File

@@ -0,0 +1,16 @@
# CreateChatCompletionResponse
Represents a chat completion response returned by model, based on the provided input.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ID` | *string* | :heavy_check_mark: | A unique identifier for the chat completion. |
| `Choices` | [][components.Choices](../../models/components/choices.md) | :heavy_check_mark: | A list of chat completion choices. Can be more than one if `n` is greater than 1. |
| `Created` | *int64* | :heavy_check_mark: | The Unix timestamp (in seconds) of when the chat completion was created. |
| `Model` | *string* | :heavy_check_mark: | The model used for the chat completion. |
| `SystemFingerprint` | **string* | :heavy_minus_sign: | This fingerprint represents the backend configuration that the model runs with.<br/><br/>Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.<br/> |
| `Object` | [components.Object](../../models/components/object.md) | :heavy_check_mark: | The object type, which is always `chat.completion`. |
| `Usage` | [*components.CompletionUsage](../../models/components/completionusage.md) | :heavy_minus_sign: | Usage statistics for the completion request. |

View File

@@ -0,0 +1,12 @@
# Detail
Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding).
## Values
| Name | Value |
| ------------ | ------------ |
| `DetailAuto` | auto |
| `DetailLow` | low |
| `DetailHigh` | high |

View File

@@ -0,0 +1,14 @@
# Feedback
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| `ID` | **string* | :heavy_minus_sign: | The unique identifier for this feedback. |
| `CreatedAtMs` | **float64* | :heavy_minus_sign: | The epoch this schema was created. |
| `TaskID` | *string* | :heavy_check_mark: | The unique identifier for the task associated with this feedback. |
| `JSONValues` | [components.JSONValues](../../models/components/jsonvalues.md) | :heavy_check_mark: | The values of the feedback. Must be valid JSON according to the task schema. |
| `MatchedCompletionIds` | []*string* | :heavy_check_mark: | The matched completion ids associated with this feedback. |
| `Comment` | *string* | :heavy_check_mark: | The comment associated with this feedback. |
| `CompletionsSummary` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,18 @@
# FinishReason
The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,
`length` if the maximum number of tokens specified in the request was reached,
`content_filter` if content was omitted due to a flag from our content filters,
`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `FinishReasonStop` | stop |
| `FinishReasonLength` | length |
| `FinishReasonToolCalls` | tool_calls |
| `FinishReasonContentFilter` | content_filter |
| `FinishReasonFunctionCall` | function_call |

View File

@@ -0,0 +1,11 @@
# Function
The function that the model called.
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Name` | *string* | :heavy_check_mark: | The name of the function to call. |
| `Arguments` | *string* | :heavy_check_mark: | The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. |

View File

@@ -0,0 +1,13 @@
# ~~FunctionCall~~
Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Arguments` | *string* | :heavy_check_mark: | The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. |
| `Name` | *string* | :heavy_check_mark: | The name of the function to call. |

View File

@@ -0,0 +1,10 @@
# FunctionObject
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Description` | **string* | :heavy_minus_sign: | A description of what the function does, used by the model to choose when and how to call the function. |
| `Name` | *string* | :heavy_check_mark: | The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. |
| `Parameters` | map[string]*any* | :heavy_minus_sign: | The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. <br/><br/>Omitting `parameters` defines a function with an empty parameter list. |

View File

@@ -0,0 +1,9 @@
# HTTPMetadata
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
| `Response` | [*http.Response](https://pkg.go.dev/net/http#Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `Request` | [*http.Request](https://pkg.go.dev/net/http#Request) | :heavy_check_mark: | Raw HTTP request; suitable for debugging |

View File

@@ -0,0 +1,9 @@
# ImageURL
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `URL` | *string* | :heavy_check_mark: | Either a URL of the image or the base64 encoded image data. |
| `Detail` | [*components.Detail](../../models/components/detail.md) | :heavy_minus_sign: | Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding). |

View File

@@ -0,0 +1,9 @@
# JSONSchema
The schema of the task. Must be valid JSON Schema.
## Fields
| Field | Type | Required | Description |
| ----------- | ----------- | ----------- | ----------- |

View File

@@ -0,0 +1,9 @@
# JSONValues
The values of the feedback. Must be valid JSON according to the task schema.
## Fields
| Field | Type | Required | Description |
| ----------- | ----------- | ----------- | ----------- |

View File

@@ -0,0 +1,11 @@
# Kind
The kind of completion i.e. chat messages or prompt
## Values
| Name | Value |
| ------------ | ------------ |
| `KindChat` | chat |
| `KindPrompt` | prompt |

View File

@@ -0,0 +1,10 @@
# Logprobs
Log probability information for the choice.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `Content` | [][components.ChatCompletionTokenLogprob](../../models/components/chatcompletiontokenlogprob.md) | :heavy_check_mark: | A list of message content tokens with log probability information. |

View File

@@ -0,0 +1,19 @@
# Model
ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.
## Supported Types
###
```go
model := components.CreateModelStr(string{/* values here */})
```
### Two
```go
model := components.CreateModelTwo(components.Two{/* values here */})
```

View File

@@ -0,0 +1,10 @@
# Object
The object type, which is always `chat.completion`.
## Values
| Name | Value |
| ---------------------- | ---------------------- |
| `ObjectChatCompletion` | chat.completion |

View File

@@ -0,0 +1,12 @@
# One
`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.
## Values
| Name | Value |
| --------- | --------- |
| `OneNone` | none |
| `OneAuto` | auto |

View File

@@ -0,0 +1,15 @@
# ResponseFormat
An object specifying the format that the model must output. Compatible with [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.
**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `Type` | [*components.CreateChatCompletionRequestType](../../models/components/createchatcompletionrequesttype.md) | :heavy_minus_sign: | Must be one of `text` or `json_object`. | json_object |

View File

@@ -0,0 +1,10 @@
# Role
The role of the messages author, in this case `system`.
## Values
| Name | Value |
| ------------ | ------------ |
| `RoleSystem` | system |

View File

@@ -0,0 +1,8 @@
# Security
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `Log10Token` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,8 @@
# Session
## Fields
| Field | Type | Required | Description |
| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- |
| `ID` | **string* | :heavy_minus_sign: | The unique identifier for this session. |

View File

@@ -0,0 +1,11 @@
# Stacktrace
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
| `File` | *string* | :heavy_check_mark: | The file associated with this stacktrace. |
| `Line` | *string* | :heavy_check_mark: | The line associated with this stacktrace. |
| `Lineno` | *float64* | :heavy_check_mark: | The line number associated with this stacktrace. |
| `Name` | *string* | :heavy_check_mark: | The function or module associated with this stacktrace. |

View File

@@ -0,0 +1,12 @@
# Status
The status of this completion.
## Values
| Name | Value |
| ---------------- | ---------------- |
| `StatusStarted` | started |
| `StatusFinished` | finished |
| `StatusFailed` | failed |

View File

@@ -0,0 +1,20 @@
# Stop
Up to 4 sequences where the API will stop generating further tokens.
## Supported Types
###
```go
stop := components.CreateStopStr(string{/* values here */})
```
###
```go
stop := components.CreateStopArrayOfStr([]string{/* values here */})
```

View File

@@ -0,0 +1,13 @@
# Task
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `ID` | **string* | :heavy_minus_sign: | The unique identifier for this task. |
| `CreatedAtMs` | **float64* | :heavy_minus_sign: | The epoch this schema was created. |
| `JSONSchema` | [components.JSONSchema](../../models/components/jsonschema.md) | :heavy_check_mark: | The schema of the task. Must be valid JSON Schema. |
| `Name` | *string* | :heavy_check_mark: | The name of the task. |
| `Instruction` | *string* | :heavy_check_mark: | The instructions for this task. |
| `CompletionTagsSelector` | [components.CompletionTagsSelector](../../models/components/completiontagsselector.md) | :heavy_check_mark: | The completion tag matching with this task i.e. surfaced as needing feedback. |

View File

@@ -0,0 +1,10 @@
# TopLogprobs
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Token` | *string* | :heavy_check_mark: | The token. |
| `Logprob` | *float64* | :heavy_check_mark: | 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. |
| `Bytes` | []*int64* | :heavy_check_mark: | 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. |

View File

@@ -0,0 +1,26 @@
# Two
## Values
| Name | Value |
| ---------------------- | ---------------------- |
| `TwoGpt4Turbo` | gpt-4-turbo |
| `TwoGpt4Turbo20240409` | gpt-4-turbo-2024-04-09 |
| `TwoGpt40125Preview` | gpt-4-0125-preview |
| `TwoGpt4TurboPreview` | gpt-4-turbo-preview |
| `TwoGpt41106Preview` | gpt-4-1106-preview |
| `TwoGpt4VisionPreview` | gpt-4-vision-preview |
| `TwoGpt4` | gpt-4 |
| `TwoGpt40314` | gpt-4-0314 |
| `TwoGpt40613` | gpt-4-0613 |
| `TwoGpt432k` | gpt-4-32k |
| `TwoGpt432k0314` | gpt-4-32k-0314 |
| `TwoGpt432k0613` | gpt-4-32k-0613 |
| `TwoGpt35Turbo` | gpt-3.5-turbo |
| `TwoGpt35Turbo16k` | gpt-3.5-turbo-16k |
| `TwoGpt35Turbo0301` | gpt-3.5-turbo-0301 |
| `TwoGpt35Turbo0613` | gpt-3.5-turbo-0613 |
| `TwoGpt35Turbo1106` | gpt-3.5-turbo-1106 |
| `TwoGpt35Turbo0125` | gpt-3.5-turbo-0125 |
| `TwoGpt35Turbo16k0613` | gpt-3.5-turbo-16k-0613 |

View File

@@ -0,0 +1,10 @@
# Type
The type of the content part.
## Values
| Name | Value |
| ---------- | ---------- |
| `TypeText` | text |

View File

@@ -0,0 +1,9 @@
# CreateFeedbackTaskResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `HTTPMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
| `Task` | [*components.Task](../../models/components/task.md) | :heavy_minus_sign: | OK |

View File

@@ -0,0 +1,8 @@
# CreateGlobals
## Fields
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `XLog10Organization` | *string* | :heavy_check_mark: | N/A |

View File

@@ -0,0 +1,9 @@
# CreateRequest
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `XLog10Organization` | **string* | :heavy_minus_sign: | N/A |
| `Completion` | [components.Completion](../../models/components/completion.md) | :heavy_check_mark: | N/A |

View File

@@ -0,0 +1,10 @@
# CreateResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `HTTPMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
| `Any` | *any* | :heavy_minus_sign: | Created |
| `Completion` | [*components.Completion](../../models/components/completion.md) | :heavy_minus_sign: | Created |

View File

@@ -0,0 +1,8 @@
# CreateSessionGlobals
## Fields
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `XLog10Organization` | *string* | :heavy_check_mark: | N/A |

View File

@@ -0,0 +1,8 @@
# CreateSessionRequest
## Fields
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `XLog10Organization` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,9 @@
# CreateSessionResponse
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `HTTPMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
| `Object` | [*operations.CreateSessionResponseBody](../../models/operations/createsessionresponsebody.md) | :heavy_minus_sign: | Created |

View File

@@ -0,0 +1,10 @@
# CreateSessionResponseBody
Created
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- |
| `Session` | [*components.Session](../../models/components/session.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,8 @@
# GetFeedbackTaskRequest
## Fields
| Field | Type | Required | Description |
| --------------------- | --------------------- | --------------------- | --------------------- |
| `TaskID` | *string* | :heavy_check_mark: | The task id to fetch. |

View File

@@ -0,0 +1,9 @@
# GetFeedbackTaskResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `HTTPMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
| `Task` | [*components.Task](../../models/components/task.md) | :heavy_minus_sign: | OK |

View File

@@ -0,0 +1,8 @@
# GetGlobals
## Fields
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `XLog10Organization` | *string* | :heavy_check_mark: | N/A |

View File

@@ -0,0 +1,9 @@
# GetRequest
## Fields
| Field | Type | Required | Description |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `FeedbackID` | *string* | :heavy_check_mark: | The feedback id to fetch. |
| `XLog10Organization` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,9 @@
# GetResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `HTTPMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
| `Feedback` | [*components.Feedback](../../models/components/feedback.md) | :heavy_minus_sign: | OK |

View File

@@ -0,0 +1,9 @@
# JSONValues
The values of the feedback. Must be valid JSON according to the task schema.
## Fields
| Field | Type | Required | Description |
| ----------- | ----------- | ----------- | ----------- |

View File

@@ -0,0 +1,9 @@
# ListFeedbackTasksResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `HTTPMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
| `Tasks` | [][components.Task](../../models/components/task.md) | :heavy_minus_sign: | OK |

View File

@@ -0,0 +1,8 @@
# ListGlobals
## Fields
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `XLog10Organization` | *string* | :heavy_check_mark: | N/A |

View File

@@ -0,0 +1,9 @@
# ListRequest
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `XLog10Organization` | **string* | :heavy_minus_sign: | N/A |
| `RequestBody` | [*operations.ListRequestBody](../../models/operations/listrequestbody.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# ListRequestBody
## Fields
| Field | Type | Required | Description |
| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- |
| `Offset` | **int64* | :heavy_minus_sign: | The offset to start fetching feedback from. |
| `Limit` | **int64* | :heavy_minus_sign: | The number of feedback to fetch. |
| `CompletionID` | **string* | :heavy_minus_sign: | The completion id to fetch feedback for. |
| `TaskID` | **string* | :heavy_minus_sign: | The task id to fetch feedback for. |

View File

@@ -0,0 +1,9 @@
# ListResponse
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| `HTTPMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
| `Object` | [*operations.ListResponseBody](../../models/operations/listresponsebody.md) | :heavy_minus_sign: | OK |

View File

@@ -0,0 +1,10 @@
# ListResponseBody
OK
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `Feedback` | [][components.Feedback](../../models/components/feedback.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,8 @@
# ListUngradedGlobals
## Fields
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `XLog10Organization` | *string* | :heavy_check_mark: | N/A |

View File

@@ -0,0 +1,8 @@
# ListUngradedRequest
## Fields
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `XLog10Organization` | **string* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,9 @@
# ListUngradedResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `HTTPMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
| `Object` | [*operations.ListUngradedResponseBody](../../models/operations/listungradedresponsebody.md) | :heavy_minus_sign: | OK |

View File

@@ -0,0 +1,10 @@
# ListUngradedResponseBody
OK
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| `Completions` | [][components.Completion](../../models/components/completion.md) | :heavy_minus_sign: | N/A |

Some files were not shown because too many files have changed in this diff Show More