Skip to content

Commit

Permalink
feat: make docs urls in comments absolute (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Sep 13, 2023
1 parent baed195 commit 9db3819
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 49 deletions.
5 changes: 3 additions & 2 deletions src/resources/audio/transcriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ export interface TranscriptionCreateParams {

/**
* An optional text to guide the model's style or continue a previous audio
* segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the
* audio language.
* segment. The
* [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting)
* should match the audio language.
*/
prompt?: string;

Expand Down
5 changes: 3 additions & 2 deletions src/resources/audio/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ export interface TranslationCreateParams {

/**
* An optional text to guide the model's style or continue a previous audio
* segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in
* English.
* segment. The
* [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting)
* should be in English.
*/
prompt?: string;

Expand Down
14 changes: 8 additions & 6 deletions src/resources/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ export interface ChatCompletionCreateParamsBase {

/**
* 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.
* [model endpoint compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility)
* table for details on which models work with the Chat API.
*/
model:
| (string & {})
Expand All @@ -326,7 +326,7 @@ export interface ChatCompletionCreateParamsBase {
* existing frequency in the text so far, decreasing the model's likelihood to
* repeat the same line verbatim.
*
* [See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)
* [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/gpt/parameter-details)
*/
frequency_penalty?: number | null;

Expand Down Expand Up @@ -377,7 +377,7 @@ export interface ChatCompletionCreateParamsBase {
* whether they appear in the text so far, increasing the model's likelihood to
* talk about new topics.
*
* [See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)
* [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/gpt/parameter-details)
*/
presence_penalty?: number | null;

Expand Down Expand Up @@ -416,7 +416,8 @@ export interface ChatCompletionCreateParamsBase {

/**
* 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).
* and detect abuse.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).
*/
user?: string;
}
Expand All @@ -438,7 +439,8 @@ export namespace ChatCompletionCreateParams {

/**
* The parameters the functions accepts, described as a JSON Schema object. See the
* [guide](/docs/guides/gpt/function-calling) for examples, and the
* [guide](https://platform.openai.com/docs/guides/gpt/function-calling) for
* examples, and the
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
* documentation about the format.
*
Expand Down
14 changes: 8 additions & 6 deletions src/resources/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ export type CompletionCreateParams = CompletionCreateParamsNonStreaming | Comple
export interface CompletionCreateParamsBase {
/**
* ID of the model to use. You can use the
* [List models](/docs/api-reference/models/list) API to see all of your available
* models, or see our [Model overview](/docs/models/overview) for descriptions of
* them.
* [List models](https://platform.openai.com/docs/api-reference/models/list) API to
* see all of your available models, or see our
* [Model overview](https://platform.openai.com/docs/models/overview) for
* descriptions of them.
*/
model:
| (string & {})
Expand Down Expand Up @@ -166,7 +167,7 @@ export interface CompletionCreateParamsBase {
* existing frequency in the text so far, decreasing the model's likelihood to
* repeat the same line verbatim.
*
* [See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)
* [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/gpt/parameter-details)
*/
frequency_penalty?: number | null;

Expand Down Expand Up @@ -221,7 +222,7 @@ export interface CompletionCreateParamsBase {
* whether they appear in the text so far, increasing the model's likelihood to
* talk about new topics.
*
* [See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)
* [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/gpt/parameter-details)
*/
presence_penalty?: number | null;

Expand Down Expand Up @@ -266,7 +267,8 @@ export interface CompletionCreateParamsBase {

/**
* 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).
* and detect abuse.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).
*/
user?: string;
}
Expand Down
13 changes: 8 additions & 5 deletions src/resources/embeddings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export namespace CreateEmbeddingResponse {
export interface Embedding {
/**
* The embedding vector, which is a list of floats. The length of vector depends on
* the model as listed in the [embedding guide](/docs/guides/embeddings).
* the model as listed in the
* [embedding guide](https://platform.openai.com/docs/guides/embeddings).
*/
embedding: Array<number>;

Expand Down Expand Up @@ -89,15 +90,17 @@ export interface EmbeddingCreateParams {

/**
* ID of the model to use. You can use the
* [List models](/docs/api-reference/models/list) API to see all of your available
* models, or see our [Model overview](/docs/models/overview) for descriptions of
* them.
* [List models](https://platform.openai.com/docs/api-reference/models/list) API to
* see all of your available models, or see our
* [Model overview](https://platform.openai.com/docs/models/overview) for
* descriptions of them.
*/
model: (string & {}) | 'text-embedding-ada-002';

/**
* 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).
* and detect abuse.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).
*/
user?: string;
}
Expand Down
5 changes: 3 additions & 2 deletions src/resources/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ export interface FileCreateParams {
/**
* The intended purpose of the uploaded documents.
*
* Use "fine-tune" for [fine-tuning](/docs/api-reference/fine-tuning). This allows
* us to validate the format of the uploaded file.
* Use "fine-tune" for
* [fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning). This
* allows us to validate the format of the uploaded file.
*/
purpose: string;
}
Expand Down
31 changes: 16 additions & 15 deletions src/resources/fine-tunes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class FineTunes extends APIResource {
* Response includes details of the enqueued job including job status and the name
* of the fine-tuned models once complete.
*
* [Learn more about fine-tuning](/docs/guides/legacy-fine-tuning)
* [Learn more about fine-tuning](https://platform.openai.com/docs/guides/legacy-fine-tuning)
*/
create(body: FineTuneCreateParams, options?: Core.RequestOptions): Core.APIPromise<FineTune> {
return this.post('/fine-tunes', { body, ...options });
Expand All @@ -24,7 +24,7 @@ export class FineTunes extends APIResource {
/**
* Gets info about the fine-tune job.
*
* [Learn more about fine-tuning](/docs/guides/legacy-fine-tuning)
* [Learn more about fine-tuning](https://platform.openai.com/docs/guides/legacy-fine-tuning)
*/
retrieve(fineTuneId: string, options?: Core.RequestOptions): Core.APIPromise<FineTune> {
return this.get(`/fine-tunes/${fineTuneId}`, options);
Expand Down Expand Up @@ -105,8 +105,8 @@ export interface FineTune {

/**
* The hyperparameters used for the fine-tuning job. See the
* [fine-tuning guide](/docs/guides/legacy-fine-tuning/hyperparameters) for more
* details.
* [fine-tuning guide](https://platform.openai.com/docs/guides/legacy-fine-tuning/hyperparameters)
* for more details.
*/
hyperparams: FineTune.Hyperparams;

Expand Down Expand Up @@ -160,8 +160,8 @@ export interface FineTune {
export namespace FineTune {
/**
* The hyperparameters used for the fine-tuning job. See the
* [fine-tuning guide](/docs/guides/legacy-fine-tuning/hyperparameters) for more
* details.
* [fine-tuning guide](https://platform.openai.com/docs/guides/legacy-fine-tuning/hyperparameters)
* for more details.
*/
export interface Hyperparams {
/**
Expand Down Expand Up @@ -224,15 +224,16 @@ export interface FineTuneCreateParams {
/**
* The ID of an uploaded file that contains training data.
*
* See [upload file](/docs/api-reference/files/upload) for how to upload a file.
* See [upload file](https://platform.openai.com/docs/api-reference/files/upload)
* for how to upload a file.
*
* Your dataset must be formatted as a JSONL file, where each training example is a
* JSON object with the keys "prompt" and "completion". Additionally, you must
* upload your file with the purpose `fine-tune`.
*
* See the
* [fine-tuning guide](/docs/guides/legacy-fine-tuning/creating-training-data) for
* more details.
* [fine-tuning guide](https://platform.openai.com/docs/guides/legacy-fine-tuning/creating-training-data)
* for more details.
*/
training_file: string;

Expand Down Expand Up @@ -276,7 +277,7 @@ export interface FineTuneCreateParams {
* If set, we calculate classification-specific metrics such as accuracy and F-1
* score using the validation set at the end of every epoch. These metrics can be
* viewed in the
* [results file](/docs/guides/legacy-fine-tuning/analyzing-your-fine-tuned-model).
* [results file](https://platform.openai.com/docs/guides/legacy-fine-tuning/analyzing-your-fine-tuned-model).
*
* In order to compute classification metrics, you must provide a
* `validation_file`. Additionally, you must specify `classification_n_classes` for
Expand All @@ -299,8 +300,8 @@ export interface FineTuneCreateParams {
/**
* The name of the base model to fine-tune. You can select one of "ada", "babbage",
* "curie", "davinci", or a fine-tuned model created after 2022-04-21 and before
* 2023-08-22. To learn more about these models, see the [Models](/docs/models)
* documentation.
* 2023-08-22. To learn more about these models, see the
* [Models](https://platform.openai.com/docs/models) documentation.
*/
model?: (string & {}) | 'ada' | 'babbage' | 'curie' | 'davinci' | null;

Expand Down Expand Up @@ -335,16 +336,16 @@ export interface FineTuneCreateParams {
*
* If you provide this file, the data is used to generate validation metrics
* periodically during fine-tuning. These metrics can be viewed in the
* [fine-tuning results file](/docs/guides/legacy-fine-tuning/analyzing-your-fine-tuned-model).
* [fine-tuning results file](https://platform.openai.com/docs/guides/legacy-fine-tuning/analyzing-your-fine-tuned-model).
* Your train and validation data should be mutually exclusive.
*
* Your dataset must be formatted as a JSONL file, where each validation example is
* a JSON object with the keys "prompt" and "completion". Additionally, you must
* upload your file with the purpose `fine-tune`.
*
* See the
* [fine-tuning guide](/docs/guides/legacy-fine-tuning/creating-training-data) for
* more details.
* [fine-tuning guide](https://platform.openai.com/docs/guides/legacy-fine-tuning/creating-training-data)
* for more details.
*/
validation_file?: string | null;
}
Expand Down
21 changes: 13 additions & 8 deletions src/resources/fine-tuning/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class Jobs extends APIResource {
* Response includes details of the enqueued job including job status and the name
* of the fine-tuned models once complete.
*
* [Learn more about fine-tuning](/docs/guides/fine-tuning)
* [Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning)
*/
create(body: JobCreateParams, options?: Core.RequestOptions): Core.APIPromise<FineTuningJob> {
return this.post('/fine_tuning/jobs', { body, ...options });
Expand All @@ -23,7 +23,7 @@ export class Jobs extends APIResource {
/**
* Get info about a fine-tuning job.
*
* [Learn more about fine-tuning](/docs/guides/fine-tuning)
* [Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning)
*/
retrieve(fineTuningJobId: string, options?: Core.RequestOptions): Core.APIPromise<FineTuningJob> {
return this.get(`/fine_tuning/jobs/${fineTuningJobId}`, options);
Expand Down Expand Up @@ -111,7 +111,8 @@ export interface FineTuningJob {

/**
* The hyperparameters used for the fine-tuning job. See the
* [fine-tuning guide](/docs/guides/fine-tuning) for more details.
* [fine-tuning guide](https://platform.openai.com/docs/guides/fine-tuning) for
* more details.
*/
hyperparameters: FineTuningJob.Hyperparameters;

Expand Down Expand Up @@ -165,7 +166,8 @@ export interface FineTuningJob {
export namespace FineTuningJob {
/**
* The hyperparameters used for the fine-tuning job. See the
* [fine-tuning guide](/docs/guides/fine-tuning) for more details.
* [fine-tuning guide](https://platform.openai.com/docs/guides/fine-tuning) for
* more details.
*/
export interface Hyperparameters {
/**
Expand Down Expand Up @@ -193,19 +195,21 @@ export interface FineTuningJobEvent {
export interface JobCreateParams {
/**
* The name of the model to fine-tune. You can select one of the
* [supported models](/docs/guides/fine-tuning/what-models-can-be-fine-tuned).
* [supported models](https://platform.openai.com/docs/guides/fine-tuning/what-models-can-be-fine-tuned).
*/
model: (string & {}) | 'babbage-002' | 'davinci-002' | 'gpt-3.5-turbo';

/**
* The ID of an uploaded file that contains training data.
*
* See [upload file](/docs/api-reference/files/upload) for how to upload a file.
* See [upload file](https://platform.openai.com/docs/api-reference/files/upload)
* for how to upload a file.
*
* Your dataset must be formatted as a JSONL file. Additionally, you must upload
* your file with the purpose `fine-tune`.
*
* See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.
* See the [fine-tuning guide](https://platform.openai.com/docs/guides/fine-tuning)
* for more details.
*/
training_file: string;

Expand Down Expand Up @@ -234,7 +238,8 @@ export interface JobCreateParams {
* Your dataset must be formatted as a JSONL file. You must upload your file with
* the purpose `fine-tune`.
*
* See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.
* See the [fine-tuning guide](https://platform.openai.com/docs/guides/fine-tuning)
* for more details.
*/
validation_file?: string | null;
}
Expand Down
9 changes: 6 additions & 3 deletions src/resources/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export interface ImageCreateVariationParams {

/**
* 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).
* and detect abuse.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).
*/
user?: string;
}
Expand Down Expand Up @@ -123,7 +124,8 @@ export interface ImageEditParams {

/**
* 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).
* and detect abuse.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).
*/
user?: string;
}
Expand Down Expand Up @@ -154,7 +156,8 @@ export interface ImageGenerateParams {

/**
* 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).
* and detect abuse.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).
*/
user?: string;
}
Expand Down

0 comments on commit 9db3819

Please sign in to comment.