Skip to content

Commit d8cb105

Browse files
authored
[AI] Improve refdocs (#7282)
The improvements include: - Link directly to the list of supported models in the documentation. - Fix rendering issues with numbers being translated as numbered lists - Link to firebase documentation instead of vertex documentation when corresponding.
1 parent 296ab29 commit d8cb105

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

firebase-ai/src/main/kotlin/com/google/firebase/ai/FirebaseAI.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ internal constructor(
5151
/**
5252
* Instantiates a new [GenerativeModel] given the provided parameters.
5353
*
54-
* @param modelName The name of the model to use, for example `"gemini-2.0-flash-exp"`.
54+
* @param modelName The name of the model to use. See the documentation for a list of
55+
* [supported models](https://firebase.google.com/docs/ai-logic/models).
5556
* @param generationConfig The configuration parameters to use for content generation.
5657
* @param safetySettings The safety bounds the model will abide to during content generation.
5758
* @param tools A list of [Tool]s the model may use to generate content.
@@ -106,7 +107,8 @@ internal constructor(
106107
/**
107108
* Instantiates a new [LiveGenerationConfig] given the provided parameters.
108109
*
109-
* @param modelName The name of the model to use, for example `"gemini-2.0-flash-exp"`.
110+
* @param modelName The name of the model to use. See the documentation for a list of
111+
* [supported models](https://firebase.google.com/docs/ai-logic/models).
110112
* @param generationConfig The configuration parameters to use for content generation.
111113
* @param tools A list of [Tool]s the model may use to generate content.
112114
* @param systemInstruction [Content] instructions that direct the model to behave a certain way.
@@ -157,7 +159,8 @@ internal constructor(
157159
/**
158160
* Instantiates a new [ImagenModel] given the provided parameters.
159161
*
160-
* @param modelName The name of the model to use, for example `"imagen-3.0-generate-001"`.
162+
* @param modelName The name of the model to use. See the documentation for a list of
163+
* [supported models](https://firebase.google.com/docs/ai-logic/models).
161164
* @param generationConfig The configuration parameters to use for image generation.
162165
* @param safetySettings The safety bounds the model will abide by during image generation.
163166
* @param requestOptions Configuration options for sending requests to the backend.

firebase-ai/src/main/kotlin/com/google/firebase/ai/ImagenModel.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ import com.google.firebase.auth.internal.InternalAuthProvider
4141
/**
4242
* Represents a generative model (like Imagen), capable of generating images based on various input
4343
* types.
44+
*
45+
* See the documentation for a list of
46+
* [supported models](https://firebase.google.com/docs/ai-logic/models).
4447
*/
4548
@PublicPreviewAPI
4649
public class ImagenModel

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Candidate.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ internal constructor(
7676
*
7777
* @property category The category of harm being assessed (e.g., Hate speech).
7878
* @property probability The likelihood of the content causing harm.
79-
* @property probabilityScore A numerical score representing the probability of harm, between 0 and
80-
* 1.
79+
* @property probabilityScore A numerical score representing the probability of harm, between `0`
80+
* and `1`.
8181
* @property blocked Indicates whether the content was blocked due to safety concerns.
8282
* @property severity The severity of the potential harm.
8383
* @property severityScore A numerical score representing the severity of harm.

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/CountTokensResponse.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ import kotlinx.serialization.Serializable
2222
* The model's response to a count tokens request.
2323
*
2424
* **Important:** The counters in this class do not include billable image, video or other non-text
25-
* input. See [Vertex AI pricing](https://cloud.google.com/vertex-ai/generative-ai/pricing) for
26-
* details.
25+
* input. See [Pricing](https://firebase.google.com/docs/ai-logic/pricing) for details.
2726
*
2827
* @property totalTokens The total number of tokens in the input given to the model as a prompt.
2928
* @property totalBillableCharacters The total number of billable characters in the text input given
3029
* to the model as a prompt. **Important:** this property does not include billable image, video or
31-
* other non-text input. See
32-
* [Vertex AI pricing](https://cloud.google.com/vertex-ai/generative-ai/pricing) for details.
30+
* other non-text input. See [Pricing](https://firebase.google.com/docs/ai-logic/pricing) for
31+
* details.
3332
* @property promptTokensDetails The breakdown, by modality, of how many tokens are consumed by the
3433
* prompt.
3534
*/

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Part.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ internal constructor(
132132
*
133133
* @param inlineData the binary data as a [ByteArray]
134134
* @param mimeType an IANA standard MIME type. For supported values, see the
135-
* [Vertex AI documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/send-multimodal-prompts#media_requirements)
135+
* [Firebase documentation](https://firebase.google.com/docs/vertex-ai/input-file-requirements).
136136
*/
137137
public class InlineDataPart
138138
internal constructor(

0 commit comments

Comments
 (0)