You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: async-openai/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,14 +32,14 @@
32
32
-[ ] Microsoft Azure Endpoints / AD Authentication (see [issue](https://github.com/64bit/async-openai/issues/32))
33
33
-[x] Models
34
34
-[x] Moderations
35
-
- Non-streaming requests are retried with exponential backoff when [rate limited](https://help.openai.com/en/articles/5955598-is-api-usage-subject-to-any-rate-limits) by the API server.
35
+
- Non-streaming requests are retried with exponential backoff when [rate limited](https://platform.openai.com/docs/guides/rate-limits) by the API server.
36
36
- Ergonomic Rust library with builder pattern for all request objects.
37
37
38
38
*Being a young project there could be rough edges.*
39
39
40
40
## Usage
41
41
42
-
The library reads [API key](https://beta.openai.com/account/api-keys) from the environment variable `OPENAI_API_KEY`.
42
+
The library reads [API key](https://platform.openai.com/account/api-keys) from the environment variable `OPENAI_API_KEY`.
Copy file name to clipboardExpand all lines: async-openai/src/types/types.rs
+19-19Lines changed: 19 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ pub enum Stop {
44
44
#[builder(derive(Debug))]
45
45
#[builder(build_fn(error = "OpenAIError"))]
46
46
pubstructCreateCompletionRequest{
47
-
/// ID of the model to use. You can use the [List models](https://beta.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://beta.openai.com/docs/models/overview) for descriptions of them.
47
+
/// ID of the model to use. You can use the [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.
48
48
pubmodel:String,
49
49
50
50
/// The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.
/// 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.
105
105
///
106
-
/// [See more information about frequency and presence penalties.](https://beta.openai.com/docs/api-reference/parameter-details)
106
+
/// [See more information about frequency and presence penalties.](https://platform.openai.com/docs/api-reference/parameter-details)
/// 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.
111
111
///
112
-
/// [See more information about frequency and presence penalties.](https://beta.openai.com/docs/api-reference/parameter-details)
112
+
/// [See more information about frequency and presence penalties.](https://platform.openai.com/docs/api-reference/parameter-details)
/// A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](https://beta.openai.com/docs/usage-policies/end-user-ids).
132
+
/// A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/usage-policies/end-user-ids).
133
133
#[serde(skip_serializing_if = "Option::is_none")]
134
134
pubuser:Option<String>,
135
135
}
@@ -178,7 +178,7 @@ pub type CompletionResponseStream =
178
178
#[builder(derive(Debug))]
179
179
#[builder(build_fn(error = "OpenAIError"))]
180
180
pubstructCreateEditRequest{
181
-
/// ID of the model to use. You can use the [List models](https://beta.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://beta.openai.com/docs/models/overview) for descriptions of them.
181
+
/// ID of the model to use. You can use the [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.
182
182
pubmodel:String,
183
183
184
184
/// The input text to use as a starting point for the edit.
/// A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](https://beta.openai.com/docs/usage-policies/end-user-ids).
260
+
/// A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/usage-policies/end-user-ids).
/// The format in which the generated images are returned. Must be one of `url` or `b64_json`.
307
307
pubresponse_format:Option<ResponseFormat>,
308
308
309
-
/// A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](https://beta.openai.com/docs/usage-policies/end-user-ids).
309
+
/// A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/usage-policies/end-user-ids).
/// The format in which the generated images are returned. Must be one of `url` or `b64_json`.
330
330
pubresponse_format:Option<ResponseFormat>,
331
331
332
-
/// A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](https://beta.openai.com/docs/usage-policies/end-user-ids).
332
+
/// A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/usage-policies/end-user-ids).
333
333
pubuser:Option<String>,
334
334
}
335
335
@@ -424,12 +424,12 @@ pub struct FileInput {
424
424
pubstructCreateFileRequest{
425
425
/// Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded.
426
426
///
427
-
/// If the `purpose` is set to "fine-tune", each line is a JSON record with "prompt" and "completion" fields representing your [training examples](https://beta.openai.com/docs/guides/fine-tuning/prepare-training-data).
427
+
/// If the `purpose` is set to "fine-tune", each line is a JSON record with "prompt" and "completion" fields representing your [training examples](https://platform.openai.com/docs/guides/fine-tuning/prepare-training-data).
428
428
pubfile:FileInput,
429
429
430
430
/// The intended purpose of the uploaded documents.
431
431
///
432
-
/// Use "fine-tune" for [Fine-tuning](https://beta.openai.com/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
432
+
/// Use "fine-tune" for [Fine-tuning](https://platform.openai.com/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
433
433
pubpurpose:String,
434
434
}
435
435
@@ -467,33 +467,33 @@ pub struct OpenAIFile {
467
467
pubstructCreateFineTuneRequest{
468
468
/// The ID of an uploaded file that contains training data.
469
469
///
470
-
/// See [upload file](https://beta.openai.com/docs/api-reference/files/upload) for how to upload a file.
470
+
/// See [upload file](https://platform.openai.com/docs/api-reference/files/upload) for how to upload a file.
471
471
///
472
472
/// Your dataset must be formatted as a JSONL file, where each training
473
473
/// example is a JSON object with the keys "prompt" and "completion".
474
474
/// Additionally, you must upload your file with the purpose `fine-tune`.
475
475
///
476
-
/// See the [fine-tuning guide](https://beta.openai.com/docs/guides/fine-tuning/creating-training-data) for more details.
476
+
/// See the [fine-tuning guide](https://platform.openai.com/docs/guides/fine-tuning/creating-training-data) for more details.
477
477
pubtraining_file:String,
478
478
479
479
/// The ID of an uploaded file that contains validation data.
480
480
///
481
481
/// If you provide this file, the data is used to generate validation
482
482
/// metrics periodically during fine-tuning. These metrics can be viewed in
483
-
/// the [fine-tuning results file](https://beta.openai.com/docs/guides/fine-tuning/analyzing-your-fine-tuned-model).
483
+
/// the [fine-tuning results file](https://platform.openai.com/docs/guides/fine-tuning/analyzing-your-fine-tuned-model).
484
484
/// Your train and validation data should be mutually exclusive.
485
485
///
486
486
/// Your dataset must be formatted as a JSONL file, where each validation
487
487
/// example is a JSON object with the keys "prompt" and "completion".
488
488
/// Additionally, you must upload your file with the purpose `fine-tune`.
489
489
///
490
-
/// See the [fine-tuning guide](https://beta.openai.com/docs/guides/fine-tuning/creating-training-data) for more details.
490
+
/// See the [fine-tuning guide](https://platform.openai.com/docs/guides/fine-tuning/creating-training-data) for more details.
491
491
#[serde(skip_serializing_if = "Option::is_none")]
492
492
pubvalidation_file:Option<String>,
493
493
494
494
/// The name of the base model to fine-tune. You can select one of "ada",
495
495
/// "babbage", "curie", "davinci", or a fine-tuned model created after 2022-04-21.
496
-
/// To learn more about these models, see the [Models](https://beta.openai.com/docs/models) documentation.
496
+
/// To learn more about these models, see the [Models](https://platform.openai.com/docs/models) documentation.
0 commit comments