Graphrt

Google Gemini

GenerateContent (tanpa streaming), countTokens, embedding, model dan Files API dengan upload yang bisa dilanjutkan (delete_file hanya lewat node)

Beta v0.1.0 Node.js 11 aksi
Pakai di Graphrt Desktop

Tentang

Plugin Graphrt untuk Gemini API (key Google AI Studio). Cocok untuk workflow yang butuh model kedua di samping model milik agent, misalnya membuat atau mengekstrak teks dan JSON, membaca PDF, gambar, audio dan video lewat Files API, menghitung token dan membuat embedding teks. Request tidak di-stream. Setiap operasi adalah node workflow, delete_file hanya lewat node.

Yang bisa dilakukan

  • generate_content: contents, system_instruction, generation_config (max tokens, JSON responseMimeType + responseSchema, thinkingConfig), tools (functions, Google Search), safety_settings, cached_content
  • count_tokens: token count for contents (free)
  • Embeddings: embed_content (one text, task_type, output_dimensionality) and batch_embed_contents (up to 100 texts)
  • Models: list_models, get_model
  • Files API: upload_file (Google's resumable upload, from an https URL or an allowed local directory), list_files, get_file, delete_file
  • api_request: any other endpoint under https://generativelanguage.googleapis.com/v1beta (GET only for agents)

Aksi

Setiap aksi adalah langkah yang bisa ditambahkan ke workflow. Agent juga bisa memakai sebagian besar aksi sebagai tool.

  • Generate content gemini.generate_content
  • Count tokens gemini.count_tokens
  • Embed content gemini.embed_content
  • Embed many texts gemini.batch_embed_contents
  • List models gemini.list_models
  • Get model gemini.get_model
  • List files gemini.list_files
  • Get file gemini.get_file
  • Delete file gemini.delete_file
  • Gemini API request gemini.api_request
Tampilkan semua 11 aksi
  • Upload file gemini.upload_file

Pengaturan

Graphrt menyalakan plugin dengan environment yang bersih. Hanya nilai ini yang sampai ke plugin, dan secret tidak masuk log.

  • GEMINI_API_KEY Wajib
    API key, sent as the x-goog-api-key header (never in the URL)
  • GEMINI_TOOL_ALLOW_URL_CONTEXT Opsional
    1 lets agent tools pass the urlContext tool to generate_content (off by default: it makes Google fetch URLs from the prompt)
  • GEMINI_UPLOAD_DIR Opsional
    Directory upload_file may read local files from (absolute path). Without it, file must be an https URL

Cara memakainya

Di Graphrt Desktop

  1. Buka Plugins dan cari Google Gemini.
  2. Klik Install lalu setujui.
  3. Ikuti langkah setup di halaman plugin, lalu tempel pengaturan yang dibutuhkan.
  4. Jelaskan pekerjaan yang membutuhkannya, dan builder menambahkan langkahnya.
Plugin di Graphrt Desktop

Dengan CLI

terminal
$ graphrt plugin install gemini
workflow.yaml
- id: extract
  type: gemini.generate_content
  model: gemini-2.5-flash
  contents:
    - role: user
      parts: [{ text: "Extract the invoice number and total from: {{#start.text#}}" }]
  generation_config:
    responseMimeType: application/json
    responseSchema: { type: object, properties: { number: { type: string }, total: { type: number } } }
- id: answer
  type: answer
  answer: "{{#extract.data.candidates.0.content.parts.0.text#}}"
Plugin di docs