[go: nahoru, domu]

Skip to content

Commit

Permalink
feat(generative-ai): Add basic samples for Gemini / VertexAI inference (
Browse files Browse the repository at this point in the history
#3670)

* feat(generative-ai): Add sample for basic text generation.

* chore: fix lint issues

* feat: Add basic multimodal example

* chore: add header

* feat: Add streaming inference example

* feat: Add example for multimodal streaming response

* fix: Fix some tests that were not running correctly

* chore: Clarify test names

* fix: Adjust cloud storage bucket and argurment order for consistency

* chore: fix lint errors

* chore: Update some tests and prompt text to be clearer

* Update model to the correct multimodal model
* Clarify multimodal prompt based on order

* chore: Update function calling stream model to address flaky test.
  • Loading branch information
arbrown committed May 6, 2024
1 parent 0185fe4 commit fa448ea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function generateContent(
mime_type: 'image/jpeg',
},
},
{text: 'Are following video and image correlated?'},
{text: 'Are this video and image correlated?'},
],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function generateContent(
mime_type: 'image/jpeg',
},
},
{text: 'Are following video and image correlated?'},
{text: 'Are this video and image correlated?'},
],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('Generative AI Function Calling Stream Chat', () => {
*/
// const projectId = 'YOUR_PROJECT_ID';
// const location = 'YOUR_LOCATION';
// const model = 'gemini-1.0-pro';
// const model = 'gemini-1.5-pro-preview-0409';

it('should create stream chat and begin the conversation the same in each instance', async () => {
const output = execSync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('Generative AI Multimodal Text Inference', () => {
*/
// const projectId = 'YOUR_PROJECT_ID';
// const location = 'YOUR_LOCATION';
// const model = 'gemini-1.0-pro';
// const model = 'gemini-1.5-pro-preview-0409';

it('should generate text based on a prompt containing text, a video, and an image', async () => {
const output = execSync(
Expand Down

0 comments on commit fa448ea

Please sign in to comment.