Mistral AI
Chat dan FIM completion (tanpa streaming), embedding, moderasi, OCR PDF dan gambar ke markdown, model, file dan batch job (hapus dan batal hanya lewat node)
Beta v0.1.0 Node.js 18 aksi
Tentang
Plugin Graphrt untuk Mistral AI API. Cocok untuk workflow yang butuh model kedua di samping model milik agent, yaitu chat dan code completion, embedding, moderasi, dan Mistral OCR untuk mengubah PDF dan gambar menjadi markdown. Request tidak di-stream. Setiap operasi adalah node workflow, hapus dan pembatalan batch hanya lewat node.
Yang bisa dilakukan
- create_chat_completion: messages, response_format (JSON mode, JSON schema), tools, safe_prompt
- create_fim_completion: Codestral fill-in-the-middle (prompt + suffix)
- create_embeddings: mistral-embed or codestral-embed (with output_dimension, output_dtype)
- Moderation: moderate_text (texts) and moderate_chat (the last message in its conversation)
- ocr_document: a PDF or image (URL, data URL or uploaded file id) to markdown per page, with tables, headers, footers and an optional JSON-schema document_annotation_format
- Models: list_models, get_model
- Files: list_files (paginated), upload_file, get_file, download_file_content (saved to disk), delete_file
- Batch jobs: create_batch_job (files or inline requests), get_batch_job, list_batch_jobs, cancel_batch_job
Aksi
Setiap aksi adalah langkah yang bisa ditambahkan ke workflow. Agent juga bisa memakai sebagian besar aksi sebagai tool.
- Create chat completion
mistral.create_chat_completion - Fill in the middle (code)
mistral.create_fim_completion - Create embeddings
mistral.create_embeddings - Moderate text
mistral.moderate_text - Moderate conversation
mistral.moderate_chat - OCR document
mistral.ocr_document - List models
mistral.list_models - Get model
mistral.get_model - List files
mistral.list_files - Upload file
mistral.upload_file
Tampilkan semua 18 aksi
- Get file
mistral.get_file - Download file content
mistral.download_file_content - Delete file
mistral.delete_file - Create batch job
mistral.create_batch_job - Get batch job
mistral.get_batch_job - List batch jobs
mistral.list_batch_jobs - Cancel batch job
mistral.cancel_batch_job - Mistral AI API request
mistral.api_request
Pengaturan
Graphrt menyalakan plugin dengan environment yang bersih. Hanya nilai ini yang sampai ke plugin, dan secret tidak masuk log.
-
MISTRAL_API_KEYWajibAPI key, sent as Authorization: Bearer -
MISTRAL_UPLOAD_DIROpsionalDirectory upload_file may read local files from (absolute path). Without it, file must be an https URL -
MISTRAL_TOOL_ALLOW_BATCHOpsional1 lets agent tools call create_batch_job (off by default: one call can queue thousands of paid requests) -
MISTRAL_OUTPUT_DIRFor download_file_contentAbsolute directory where file content is saved
Cara memakainya
Di Graphrt Desktop
- Buka Plugins dan cari Mistral AI.
- Klik Install lalu setujui.
- Ikuti langkah setup di halaman plugin, lalu tempel pengaturan yang dibutuhkan.
- Jelaskan pekerjaan yang membutuhkannya, dan builder menambahkan langkahnya.
Dengan CLI
terminal
$ graphrt plugin install mistral workflow.yaml
- id: ocr
type: mistral.ocr_document
document: { type: document_url, document_url: "{{#start.pdf_url#}}" }
- id: fields
type: mistral.create_chat_completion
model: mistral-small-latest
response_format: { type: json_object }
messages:
- { role: system, content: "Return JSON with invoice_number and total." }
- { role: user, content: "{{#ocr.data.pages.0.markdown#}}" }