From 87121182874d46f0ed0a3e1c2dc9ff11766d6d4a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 18:38:13 +0000 Subject: [PATCH] chore(docs): doc improvements --- CONTRIBUTING.md | 2 +- audiotranscription.go | 2 ++ chatcompletion.go | 2 ++ moderation.go | 26 ++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e2120a6..95426be 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ To set up the repository, run: ```sh $ ./scripts/bootstrap -$ ./scripts/build +$ ./scripts/lint ``` This will install all the required dependencies and build the SDK. diff --git a/audiotranscription.go b/audiotranscription.go index 2844195..d8aa7c4 100644 --- a/audiotranscription.go +++ b/audiotranscription.go @@ -352,6 +352,8 @@ type AudioTranscriptionNewParams struct { // Either or both of these options are supported: `word`, or `segment`. Note: There // is no additional latency for segment timestamps, but generating word timestamps // incurs additional latency. + // + // Any of "word", "segment". TimestampGranularities []string `json:"timestamp_granularities,omitzero"` paramObj } diff --git a/chatcompletion.go b/chatcompletion.go index 0c726ce..d3e21e2 100644 --- a/chatcompletion.go +++ b/chatcompletion.go @@ -2241,6 +2241,8 @@ type ChatCompletionNewParams struct { // this model generate both text and audio responses, you can use: // // `["text", "audio"]` + // + // Any of "text", "audio". Modalities []string `json:"modalities,omitzero"` // **o-series models only** // diff --git a/moderation.go b/moderation.go index 924e07c..54ff7b8 100644 --- a/moderation.go +++ b/moderation.go @@ -146,30 +146,56 @@ func (r *ModerationCategories) UnmarshalJSON(data []byte) error { // A list of the categories along with the input type(s) that the score applies to. type ModerationCategoryAppliedInputTypes struct { // The applied input type(s) for the category 'harassment'. + // + // Any of "text". Harassment []string `json:"harassment,required"` // The applied input type(s) for the category 'harassment/threatening'. + // + // Any of "text". HarassmentThreatening []string `json:"harassment/threatening,required"` // The applied input type(s) for the category 'hate'. + // + // Any of "text". Hate []string `json:"hate,required"` // The applied input type(s) for the category 'hate/threatening'. + // + // Any of "text". HateThreatening []string `json:"hate/threatening,required"` // The applied input type(s) for the category 'illicit'. + // + // Any of "text". Illicit []string `json:"illicit,required"` // The applied input type(s) for the category 'illicit/violent'. + // + // Any of "text". IllicitViolent []string `json:"illicit/violent,required"` // The applied input type(s) for the category 'self-harm'. + // + // Any of "text", "image". SelfHarm []string `json:"self-harm,required"` // The applied input type(s) for the category 'self-harm/instructions'. + // + // Any of "text", "image". SelfHarmInstructions []string `json:"self-harm/instructions,required"` // The applied input type(s) for the category 'self-harm/intent'. + // + // Any of "text", "image". SelfHarmIntent []string `json:"self-harm/intent,required"` // The applied input type(s) for the category 'sexual'. + // + // Any of "text", "image". Sexual []string `json:"sexual,required"` // The applied input type(s) for the category 'sexual/minors'. + // + // Any of "text". SexualMinors []string `json:"sexual/minors,required"` // The applied input type(s) for the category 'violence'. + // + // Any of "text", "image". Violence []string `json:"violence,required"` // The applied input type(s) for the category 'violence/graphic'. + // + // Any of "text", "image". ViolenceGraphic []string `json:"violence/graphic,required"` // Metadata for the response, check the presence of optional fields with the // [resp.Field.IsPresent] method.