Skip to content
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

chore(deps): bump follow-redirects from 1.15.2 to 1.15.6 in /firestore-semantic-search/functions #416

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions firestore-genai-chatbot/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Version 0.0.10

- Add docs on regional support for Gemini APIs

## Version 0.0.9

- fix typo in documentation
Expand Down
6 changes: 5 additions & 1 deletion firestore-genai-chatbot/PREINSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ Use this extension to easily deploy a chatbot using Gemini models, stored and ma

On install you will be asked to provide:

- **Gemini API Provider** This extension makes use of the Gemini family of models. Currently the extension supports the Google AI Gemini API and the Vertex AI Gemini API. Learn more about the differences between the Google AI and Vertex AI Gemini APIs here.
- **Gemini API Provider** This extension makes use of the Gemini family of models. Currently the extension supports the Google AI Gemini API and the Vertex AI Gemini API. Learn more about the differences between the Google AI and Vertex AI Gemini APIs [here](https://cloud.google.com/vertex-ai/docs/generative-ai/migrate/migrate-google-ai).

Note that Generative AI on Vertex AI is only available in the regions listed [here](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/locations-genai).

A list of languages and regions supported by the Gemini API on Google AI is [here](https://ai.google.dev/available_regions).

- **Gemini Model**: Input the name of the Gemini model you would like to use. To view available models for each provider, see:
- [Vertex AI Gemini models](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models)
Expand Down
8 changes: 6 additions & 2 deletions firestore-genai-chatbot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

On install you will be asked to provide:

- **Gemini API Provider** This extension makes use of the Gemini family of models. Currently the extension supports the Google AI Gemini API and the Vertex AI Gemini API. Learn more about the differences between the Google AI and Vertex AI Gemini APIs here.
- **Gemini API Provider** This extension makes use of the Gemini family of models. Currently the extension supports the Google AI Gemini API and the Vertex AI Gemini API. Learn more about the differences between the Google AI and Vertex AI Gemini APIs [here](https://cloud.google.com/vertex-ai/docs/generative-ai/migrate/migrate-google-ai).

Note that Generative AI on Vertex AI is only available in the regions listed [here](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/locations-genai).

A list of languages and regions supported by the Gemini API on Google AI is [here](https://ai.google.dev/available_regions).

- **Gemini Model**: Input the name of the Gemini model you would like to use. To view available models for each provider, see:
- [Vertex AI Gemini models](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models)
Expand Down Expand Up @@ -83,7 +87,7 @@ This extension uses other Firebase and Google Cloud Platform services, which hav

* Order Field: The field by which to order when fetching conversation history. If absent when processing begins, the current timestamp will be written to this field. Sorting will be in descending order.

* Cloud Functions location: Where do you want to deploy the functions created for this extension? For help selecting a location, refer to the [location selection guide](https://firebase.google.com/docs/functions/locations).
* Cloud Functions location: Where do you want to deploy the functions created for this extension? For help selecting a location, refer to the [location selection guide](https://firebase.google.com/docs/functions/locations). Note that Generative AI on Vertex AI is only available in the regions listed [here](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/locations-genai). A list of languages and regions supported by the Gemini API on Google AI is [here](https://ai.google.dev/available_regions).

* Context: Contextual preamble for the generative AI model. A string giving context for the discussion.

Expand Down
8 changes: 6 additions & 2 deletions firestore-genai-chatbot/extension.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: firestore-genai-chatbot
version: 0.0.9
version: 0.0.10
specVersion: v1beta

icon: icon.png
Expand Down Expand Up @@ -161,7 +161,11 @@ params:
description: >-
Where do you want to deploy the functions created for this extension? For
help selecting a location, refer to the [location selection
guide](https://firebase.google.com/docs/functions/locations).
guide](https://firebase.google.com/docs/functions/locations). Note that
Generative AI on Vertex AI is only available in the regions listed
[here](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/locations-genai).
A list of languages and regions supported by the Gemini API on Google AI
is [here](https://ai.google.dev/available_regions).
type: select
options:
- label: Iowa (us-central1)
Expand Down
4 changes: 4 additions & 0 deletions firestore-multimodal-genai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Version 0.0.9

- Add docs on regional support for Gemini APIs

## Version 0.0.8

- fix typo in documentation
Expand Down
7 changes: 6 additions & 1 deletion firestore-multimodal-genai/PREINSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ This extension allows you to perform generative tasks using the Gemini API, a cu

On installation, you will be asked to provide the following information:

**Gemini API Provider**: This extension makes use of the Gemini family of large language models. Currently the extension supports the Google AI Gemini API (for developers) and the Vertex AI Gemini API. Learn more about the differences between the Google AI and Vertex AI Gemini APIs here.
- **Gemini API Provider** This extension makes use of the Gemini family of models. Currently the extension supports the Google AI Gemini API and the Vertex AI Gemini API. Learn more about the differences between the Google AI and Vertex AI Gemini APIs [here](https://cloud.google.com/vertex-ai/docs/generative-ai/migrate/migrate-google-ai).

Note that Generative AI on Vertex AI is only available in the regions listed [here](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/locations-genai).

A list of languages and regions supported by the Gemini API on Google AI is [here](https://ai.google.dev/available_regions).

**Gemini Model**: Input the name of which Gemini model you would like to use. To view available models for each provider, see:

- [Vertex AI Gemini models](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models)
Expand Down
9 changes: 7 additions & 2 deletions firestore-multimodal-genai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@

On installation, you will be asked to provide the following information:

**Gemini API Provider**: This extension makes use of the Gemini family of large language models. Currently the extension supports the Google AI Gemini API (for developers) and the Vertex AI Gemini API. Learn more about the differences between the Google AI and Vertex AI Gemini APIs here.
- **Gemini API Provider** This extension makes use of the Gemini family of models. Currently the extension supports the Google AI Gemini API and the Vertex AI Gemini API. Learn more about the differences between the Google AI and Vertex AI Gemini APIs [here](https://cloud.google.com/vertex-ai/docs/generative-ai/migrate/migrate-google-ai).

Note that Generative AI on Vertex AI is only available in the regions listed [here](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/locations-genai).

A list of languages and regions supported by the Gemini API on Google AI is [here](https://ai.google.dev/available_regions).

**Gemini Model**: Input the name of which Gemini model you would like to use. To view available models for each provider, see:

- [Vertex AI Gemini models](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models)
Expand Down Expand Up @@ -112,7 +117,7 @@ This extension uses other Firebase and Google Cloud Platform services, which hav

* Response Field: The field in the message document into which to put the response.

* Cloud Functions location: Where do you want to deploy the functions created for this extension? For help selecting a location, refer to the [location selection guide](https://firebase.google.com/docs/functions/locations).
* Cloud Functions location: Where do you want to deploy the functions created for this extension? For help selecting a location, refer to the [location selection guide](https://firebase.google.com/docs/functions/locations). Note that Generative AI on Vertex AI is only available in the regions listed [here](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/locations-genai). A list of languages and regions supported by the Gemini API on Google AI is [here](https://ai.google.dev/available_regions).

* Temperature: Controls the randomness of the output. Values can range over [0,1], inclusive. A value closer to 1 will produce responses that are more varied, while a value closer to 0 will typically result in less surprising responses from the model.

Expand Down
8 changes: 6 additions & 2 deletions firestore-multimodal-genai/extension.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: firestore-multimodal-genai
version: 0.0.8
version: 0.0.9
specVersion: v1beta

icon: icon.png
Expand Down Expand Up @@ -170,7 +170,11 @@ params:
description: >-
Where do you want to deploy the functions created for this extension? For
help selecting a location, refer to the [location selection
guide](https://firebase.google.com/docs/functions/locations).
guide](https://firebase.google.com/docs/functions/locations). Note that
Generative AI on Vertex AI is only available in the regions listed
[here](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/locations-genai).
A list of languages and regions supported by the Gemini API on Google AI
is [here](https://ai.google.dev/available_regions).
type: select
options:
- label: Iowa (us-central1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ describe('Query class tests', () => {
test('toVertexQuery() should return the proper vertex query format', () => {
const id = 'testId';
const featureVector = [0.5, 0.6, 0.7];
const neighborCount = 10;
const expectedVertexQuery = {
neighbor_count: neighborCount,
datapoint: {
datapoint_id: id,
feature_vector: featureVector,
},
};
const query = new Query(id, featureVector);

const result = query.toVertexQuery();
const result = query.toVertexQuery(neighborCount);
expect(result).toEqual(expectedVertexQuery);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ describe('queryIndex', () => {
expectedUrl,
{
deployed_index_id: 'ext_test_instance_index',
neighbor_count: 1,
queries: [
{
neighbor_count: 1,
datapoint: {
datapoint_id: 'test-id',
feature_vector: [1, 2, 3],
Expand Down
12 changes: 6 additions & 6 deletions firestore-semantic-search/functions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions firestore-semantic-search/functions/src/common/vertex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,8 @@ export async function queryIndex(
const response = await axios.post(
`https://${endpoint}/v1beta1/projects/${config.projectId}/locations/${config.location}/indexEndpoints/${indexEndpoint}:findNeighbors`,
{
queries: queries.map(query => query.toVertexQuery()),
queries: queries.map(query => query.toVertexQuery(searchResults)),
deployed_index_id: `ext_${config.instanceId.replace(/-/g, '_')}_index`,
neighbor_count: searchResults,
},
{
headers: {
Expand Down
3 changes: 2 additions & 1 deletion firestore-semantic-search/functions/src/types/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ export class Query {
this.featureVector = featureVector;
}

toVertexQuery() {
toVertexQuery(neighborCount: number) {
return {
neighbor_count: neighborCount,
datapoint: {
datapoint_id: this.id,
feature_vector: this.featureVector,
Expand Down
Loading