-
Notifications
You must be signed in to change notification settings - Fork 889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Vertex GA] Regenerate docs after Vertex GA changes #8505
base: ch-docs-rename-base
Are you sure you want to change the base?
Conversation
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
docs-devsite/vertexai-preview.md
Outdated
| [IntegerSchema](./vertexai-preview.integerschema.md#integerschema_class) | Schema class for "integer" types. | | ||
| [NumberSchema](./vertexai-preview.numberschema.md#numberschema_class) | Schema class for "number" types. | | ||
| [ObjectSchema](./vertexai-preview.objectschema.md#objectschema_class) | Schema class for "object" types. The <code>properties</code> param must be a map of Schema. | | ||
| [Schema](./vertexai-preview.schema.md#schema_class) | Parent class encompassing all Schema types, with static methods that allow building specific Schema types. This class can be converted with JSON.stringify() into a JSON string accepted by Vertex REST endpoints. (This string conversion is automatically done when calling SDK methods.) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vertex -> Vertex AI
(comment applies to several other instances, even in other files)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't seem to find the corresponding new file in the new set of files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the missing files should be back now.
docs-devsite/vertexai-preview.md
Outdated
| [HarmBlockMethod](./vertexai-preview.md#harmblockmethod) | | | ||
| [HarmBlockThreshold](./vertexai-preview.md#harmblockthreshold) | Threshold above which a prompt or candidate will be blocked. | | ||
| [HarmCategory](./vertexai-preview.md#harmcategory) | Harm categories that would cause prompts or candidates to be blocked. | | ||
| [HarmProbability](./vertexai-preview.md#harmprobability) | Probability that a prompt or candidate matches a harm category. | | ||
| [HarmSeverity](./vertexai-preview.md#harmseverity) | Harm severity levels. | | ||
| [SchemaType](./vertexai-preview.md#schematype) | Contains the list of OpenAPI data types as defined by https://swagger.io/docs/specification/data-models/data-types/ | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOT BLOCKING
Usually, we try to make all URLs into hyperlinks rather than having the actual URL exposed.
(comment applies to several other instances, even in other files)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't seem to find the corresponding new file in the new set of files?
docs-devsite/vertexai-preview.md
Outdated
| [SchemaInterface](./vertexai-preview.schemainterface.md#schemainterface_interface) | Interface for Schema class. | | ||
| [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | User-facing params passed to specific Schema static methods. | | ||
| [SchemaRequest](./vertexai-preview.schemarequest.md#schemarequest_interface) | Final format for Schema params passed to backend requests. | | ||
| [SchemaShared](./vertexai-preview.schemashared.md#schemashared_interface) | Basic <code>Schema</code> properties shared across several Schema-related types. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is Schema tagged as code here, but not anywhere else?
FWIW - I would prolly recommend tagging it almost everywhere as code. And ObjectSchema and StringSchema, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can actually make them links, so did so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't seem to find the corresponding new file in the new set of files?
| [number(numberParams)](./vertexai-preview.schema.md#schemanumber) | <code>static</code> | | | ||
| [object(objectParams)](./vertexai-preview.schema.md#schemaobject) | <code>static</code> | | | ||
| [string(stringParams)](./vertexai-preview.schema.md#schemastring) | <code>static</code> | | | ||
| [toJSON()](./vertexai-preview.schema.md#schematojson) | | Defines how this Schema should be serialized as JSON. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/JSON/stringify\#tojson\_behavior | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another exposed URL that should be a hyperlink
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was it intentional to remove toJSON()
here? Maybe I'm missing it, but it doesn't seem to be in the newly generated file?
docs-devsite/vertexai.schema.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it doesn't need to be publicly exposed, it's for internal use.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed comments. Some of the changes have added some source files to this PR, that are the source of the changes. You don't have to review them, you can just look at the markdown files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a problem that docs-devsite/_toc.yaml
was removed?
e6195cd
to
145e5d8
Compare
36f0008
to
0b8615d
Compare
e3258c4
to
ba61bce
Compare
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
responseMimeType?: string; | ||
``` | ||
|
||
## GenerationConfig.responseSchema | ||
|
||
Output response schema of the generated candidate text. This value can be a class generated with a [Schema](./vertexai-preview.schema.md#schema_class) static method like `Schema.string()` or `Schema.object()` or it can be a plain JS object matching the [SchemaRequest](./vertexai-preview.schemarequest.md#schemarequest_interface) interface. <br/>Note: This only applies when the specified `responseMIMEType` supports a schema; currently this is limited to `application/json`<!-- -->. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't responseSchema
also support the MIME type of text/x.enum
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess so. Added. I don't really know anything about it other than what's in that page so I just put the type in there and didn't add any explanation. I originally pulled this comment off the proto. https://source.corp.google.com/piper///depot/google3/google/cloud/aiplatform/master/content.proto;l=269?q=generationconfig&ss=piper%2FGoogle%2FPiper:google3%2Fgoogle%2Fcloud%2Faiplatform%2Fmaster%2F
I'm not sure what I'm supposed to use for the source of truth.
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
responseMimeType?: string; | ||
``` | ||
|
||
## GenerationConfig.responseSchema | ||
|
||
Output response schema of the generated candidate text. This value can be a class generated with a [Schema](./vertexai-preview.schema.md#schema_class) static method like `Schema.string()` or `Schema.object()` or it can be a plain JS object matching the [SchemaRequest](./vertexai-preview.schemarequest.md#schemarequest_interface) interface. <br/>Note: This only applies when the specified `responseMIMEType` supports a schema; currently this is limited to `application/json`<!-- -->. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOT BLOCKING
Schema and SchemaRequest
Both should be tagged as code in the source code. Pls look throughout the source code for other instances.
Anytime that you're referring to a specific component (method / field / enum / etc. name, file names, input / output value, etc.), then tag it as code.
One very generalized way to think about it to decide if something should be tagged as code: "Would I want this translated into German, Korean, etc.?" Note that our ref docs aren't translated, but this way of thinking helps you decide about appropriate tagging :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming by "tag as code" you mean to make it so it ends up in the markdown within <code>
tags? This was pretty tricky, we normally do it with backticks but you can't do it on links so you normally choose between either having a link or having code tags. I think I found a way to do it although it's a little fragile. I did a search/replace on all @link
s in the package.
docs-devsite/vertexai-preview.md
Outdated
| [HarmBlockMethod](./vertexai-preview.md#harmblockmethod) | | | ||
| [HarmBlockThreshold](./vertexai-preview.md#harmblockthreshold) | Threshold above which a prompt or candidate will be blocked. | | ||
| [HarmCategory](./vertexai-preview.md#harmcategory) | Harm categories that would cause prompts or candidates to be blocked. | | ||
| [HarmProbability](./vertexai-preview.md#harmprobability) | Probability that a prompt or candidate matches a harm category. | | ||
| [HarmSeverity](./vertexai-preview.md#harmseverity) | Harm severity levels. | | ||
| [SchemaType](./vertexai-preview.md#schematype) | Contains the list of OpenAPI data types as defined by https://swagger.io/docs/specification/data-models/data-types/ | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't seem to find the corresponding new file in the new set of files?
docs-devsite/vertexai-preview.md
Outdated
| [SchemaInterface](./vertexai-preview.schemainterface.md#schemainterface_interface) | Interface for Schema class. | | ||
| [SchemaParams](./vertexai-preview.schemaparams.md#schemaparams_interface) | User-facing params passed to specific Schema static methods. | | ||
| [SchemaRequest](./vertexai-preview.schemarequest.md#schemarequest_interface) | Final format for Schema params passed to backend requests. | | ||
| [SchemaShared](./vertexai-preview.schemashared.md#schemashared_interface) | Basic <code>Schema</code> properties shared across several Schema-related types. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't seem to find the corresponding new file in the new set of files?
| [format](./vertexai.schemashared.md#schemasharedformat) | string | Optional. The format of the property. | | ||
| [items](./vertexai.schemashared.md#schemashareditems) | T | Optional. The items of the property. | | ||
| [nullable](./vertexai.schemashared.md#schemasharednullable) | boolean | Optional. Whether the property is nullable. | | ||
| [properties](./vertexai.schemashared.md#schemasharedproperties) | { \[k: string\]: T; } | Optional. Map of Schemas. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOT BLOCKING
This should probably be this?
Map of Schema
objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
docs-devsite/vertexai-preview.md
Outdated
| [IntegerSchema](./vertexai-preview.integerschema.md#integerschema_class) | Schema class for "integer" types. | | ||
| [NumberSchema](./vertexai-preview.numberschema.md#numberschema_class) | Schema class for "number" types. | | ||
| [ObjectSchema](./vertexai-preview.objectschema.md#objectschema_class) | Schema class for "object" types. The <code>properties</code> param must be a map of Schema. | | ||
| [Schema](./vertexai-preview.schema.md#schema_class) | Parent class encompassing all Schema types, with static methods that allow building specific Schema types. This class can be converted with JSON.stringify() into a JSON string accepted by Vertex REST endpoints. (This string conversion is automatically done when calling SDK methods.) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't seem to find the corresponding new file in the new set of files?
| [number(numberParams)](./vertexai-preview.schema.md#schemanumber) | <code>static</code> | | | ||
| [object(objectParams)](./vertexai-preview.schema.md#schemaobject) | <code>static</code> | | | ||
| [string(stringParams)](./vertexai-preview.schema.md#schemastring) | <code>static</code> | | | ||
| [toJSON()](./vertexai-preview.schema.md#schematojson) | | Defines how this Schema should be serialized as JSON. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/JSON/stringify\#tojson\_behavior | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was it intentional to remove toJSON()
here? Maybe I'm missing it, but it doesn't seem to be in the newly generated file?
docs-devsite/vertexai.schema.md
8b1833c
to
ff3aaf6
Compare
ff3aaf6
to
9af2001
Compare
Regenerated docs based on all code changes for Vertex GA so far.
Changes are: