Skillpedia
واجهات API والخوادم (backend)22k · #10255

developing-genkit-dart

ما الذي تفعله

تساعد هذه المهارة المطورين على بناء ميزات الذكاء الاصطناعي بلغة Dart وFlutter باستخدام Genkit SDK. وهي مخصصة للأشخاص الذين يريدون إضافة وكلاء أو استدعاءات نماذج إلى تطبيق Dart.

متى تستخدمها

  • ✓عندما تريد بناء وكيل أو تدفق ذكاء اصطناعي بلغة Dart باستخدام Genkit.
  • ✓عندما تريد إضافة استدعاءات نماذج اللغة إلى تطبيق Dart أو Flutter.
  • ✓عندما تحدّث كود Genkit Dart من إصدار قديم إلى واجهة برمجية 1.0.

رابط المهارة

https://github.com/google/skills/blob/main/skills/cloud/developing-genkit-dart/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/google/skills/blob/main/skills/cloud/developing-genkit-dart/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“ابنِ تدفق Genkit بلغة Dart يأخذ موضوعًا ويعيد نكتة قصيرة من نموذج لغوي.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تكتب كود Genkit Dart باستخدام أسماء الواجهة الحالية 1.0 وأنماطها، وتشير إلى أدلة مرجعية لكل ميزة. وتساعد في الإعداد والتوليد والأدوات والتدفقات.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Genkit Dart

Genkit Dart is an AI SDK for Dart that provides a unified interface for code generation, structured outputs, tools, flows, and AI agents.

Core Features and Usage

If you need help with initializing Genkit (Genkit()), Generation (ai.generate), Tooling (ai.defineTool), Flows (ai.defineFlow), Embeddings (ai.embed), streaming, or calling remote flow endpoints, please load the core framework reference: references/genkit.md

1.0 vs pre-1.0 APIs

This skill targets Genkit Dart 1.0 (genkit: ^1.0.0). Older code and training data use pre-1.0 names that no longer compile; the common ones:

  • HTTP: startFlowServer / per-route shelfHandler / shelf_cors_headers are now GenkitRouter + serve() or asShelfHandler(), with CorsOptions; context providers take RequestData (genkit_shelf.md).
  • StatusCodes.UNAUTHENTICATED is StatusCode.unauthenticated (lowerCamelCase, same for EvalStatus.pass, ToolChoice.required).
  • No RetryPlugin; retry() is built in and takes Durations (initialDelay, maxDelay, also cacheTtl elsewhere).
  • Renames: GenerateResponseHelper -> GenerateResult (modelResponse, chunk.modelChunk), ExecutablePrompt -> Prompt<Input, Output>, embedMany -> embed, ToolFnArgs -> ToolFnArg, toolOutputSchema -> outputSchema, underlyingException -> cause, modelInfo: -> info:, RemoteAction.dispose() -> close(), prompt(input, PromptGenerateOptions(config: ...)) -> prompt(input, config: ...) (named options, like generate), defineMiddleware -> ai.defineGenerateMiddleware (app) / generateMiddleware (plugins).
  • Provider config types are prefixed: GeminiThinkingConfig, GeminiSafetySettings, GeminiGoogleSearch, GeminiSpeechConfig, GoogleGenAiEmbedderOptions, AnthropicThinkingConfig.
  • Removed: ToolInterruptException / ctx.interrupt() (return .interrupt(...)), GoogleAiModels / OpenAIModels constants (use googleAI.gemini('...'), openAI.model('...')). Simulated constrained output is opt-in via simulateConstrainedGeneration().
  • .prompt Picoschema is spec-compliant: name: type, description, never name(description): type (dotprompt.md).

Prompts (Dotprompt)

.prompt files keep prompt content out of Dart code with YAML frontmatter plus a Handlebars template. See references/dotprompt.md: promptDir, ai.prompt() (call/stream/render), variants, partials, named schemas via defineSchema, and the tools/maxTurns/returnToolRequests/use (middleware) frontmatter fields. A .prompt file can also back an agent directly via definePromptAgent.

Agents

Genkit Dart has an agent API for persistent, multi-turn conversations (sessions, snapshots, interrupts, branching, background execution, custom state, artifacts, and multi-agent delegation). The agent/session/snapshot APIs are experimental and live behind opt-in imports: server APIs come from package:genkit/experimental.dart (alongside package:genkit/genkit.dart), the browser/HTTP client from package:genkit/experimental_client.dart (alongside package:genkit/client.dart), and dart:io extras like FileSessionStore from package:genkit/experimental_io.dart. These entry points are @experimental, so importing them raises an experimental_member_use analyzer warning you can silence in analysis_options.yaml. The remoteAgent client works from any Dart app, including Flutter, and the backend is fully interchangeable — it can talk to a Genkit agent implemented in Dart, JS/TypeScript, or Go over the same HTTP protocol. A few Dart specifics: interrupts are ai.defineInterrupt(...) or tools that return .interrupt(...) (there is no ctx.interrupt()), sub-agent delegation uses the agents() middleware from package:genkit_middleware, and there is no artifacts() middleware yet (define artifact tools directly).

For more details see:

الأسئلة الشائعة

هل تدعم إصدارات Genkit الأقدم؟

تستهدف Genkit Dart 1.0 وتذكر الأسماء التي تغيّرت عن الإصدارات السابقة.

هل تغطي تطبيقات Flutter؟

نعم. تساعد في دمج نماذج اللغة في تطبيقات Dart وFlutter.

ما الميزات التي تغطيها؟

الإعداد والتوليد والأدوات والتدفقات والتضمينات والبث، واستدعاء نقاط نهاية التدفقات البعيدة.

التفاصيل

الوصف الأصلي من المؤلف

Generates code and provides documentation for the Genkit Dart SDK. Use when the user asks to build AI agents in Dart, use Genkit flows, or integrate LLMs into Dart/Flutter applications.

repo: google/skills

الشعبية

نجوم GitHub
22k
الترتيب
#10255
الترخيص
Apache-2.0
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة