Skip to content

Add proof of concept: Gemini API YouTube video Q&A CLI#1

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/initial-concept-test-gemini-api
Draft

Add proof of concept: Gemini API YouTube video Q&A CLI#1
Copilot wants to merge 4 commits intomainfrom
copilot/initial-concept-test-gemini-api

Conversation

Copy link

Copilot AI commented Feb 18, 2026

Implements JavaScript CLI tool that uses Gemini 1.5 Pro to answer questions about YouTube videos. Configuration (API key, video URL) externalized to .env file.

Implementation

  • Core application (index.js): ES module with async/await flow using @google/generative-ai SDK
  • Configuration: Environment-based via dotenv with validation on startup
  • CLI interface: Node.js readline for interactive question loop
  • Model selection: Defaults to gemini-1.5-pro-latest, overridable via GEMINI_MODEL env var
  • Exit handling: Accepts sair or exit commands

Usage Flow

// User configures .env
GEMINI_API_KEY=your_key
YOUTUBE_URL=https://www.youtube.com/watch?v=example
GEMINI_MODEL=gemini-1.5-pro-latest  // optional

// Run
npm start

// Interactive prompt
Sua pergunta: Qual é o tema principal do vídeo?
// → Sends to Gemini API with video context
// → Displays formatted response

Dependencies

  • @google/generative-ai ^0.1.3 - Gemini SDK
  • dotenv ^16.3.1 - Environment config

Error handling covers missing configuration and API failures. Documentation in Portuguese per domain context.

Original prompt

A versão inicial deve ser apenas um teste de conceito. A ideia é usar a API do Gemini 3 Pro Preview para fazer perguntas sobre um vídeo do YouTube. O link do YouTube é configurado num arquivo, assim como a chave para a API do Gemini. O sistema é Javascript. Linha de comando: para para o usuário entrar com a pergunta; manda o prompt e mostra a resposta.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 18, 2026 02:32
Co-authored-by: gladsjr <25142229+gladsjr@users.noreply.github.com>
Co-authored-by: gladsjr <25142229+gladsjr@users.noreply.github.com>
Co-authored-by: gladsjr <25142229+gladsjr@users.noreply.github.com>
Copilot AI changed the title [WIP] Add initial concept test for Gemini API with YouTube video Add proof of concept: Gemini API YouTube video Q&A CLI Feb 18, 2026
Copilot AI requested a review from gladsjr February 18, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants