developing-genkit-python
Genkit으로 Python에서 AI 앱 구축하기
Genkit Python SDK는 API 변경이 빠르고 설정 요구사항이 복잡하여 개발자들이 종종 어려움을 겪습니다. 이 스킬은 Genkit을 사용하여 Python에서 AI 기반 애플리케이션을 구축하기 위한 최신 코드 패턴, 오류 수정 방법, 워크플로 가이드를 제공합니다.
스킬 ZIP 다운로드
Claude에서 업로드
설정 → 기능 → 스킬 → 스킬 업로드로 이동
토글을 켜고 사용 시작
테스트해 보기
"developing-genkit-python" 사용 중입니다. Generate a streaming story about a robot learning to paint
예상 결과:
AI 플로우가 한 번에 한 문장씩 이야기를 생성하며, 각 청크가 실시간으로 표시됩니다. 스트리밍이 완료되면 제목과 장르가 구조화된 데이터로 추출되어 전체 이야기가 나타납니다.
"developing-genkit-python" 사용 중입니다. Analyze a Python code snippet for security issues, bugs, and style problems
예상 결과:
세 개의 분석 플로우가 병렬로 실행됩니다. 보안 검사 결과는 잠재적 취약점을 나열하고, 버그 분석은 정확성 문제를 표시하며, 스타일 검토는 개선 사항을 제안합니다. 모든 결과가 하나의 보고서로 통합됩니다.
보안 감사
낮은 위험All 233 static analysis findings are false positives. The skill is a documentation-only reference for developing Genkit Python applications. All detected patterns (shell commands, URLs, API key references, file paths) appear inside markdown code blocks and documentation text as legitimate examples for developers. No executable code, network requests, or file operations are performed by the skill itself. The skill documents GEMINI_API_KEY usage which is expected and required for Genkit Google AI development, but no credentials are exfiltrated.
품질 점수
만들 수 있는 것
신속한 Genkit 프로토타이핑
Genkit을 처음 접하는 Python 개발자가 빠르게 프로젝트를 스캐폴딩하고, Gemini API를 설정하며, 구조화된 출력을 갖춘 작동하는 AI 플로우를 몇 분 만에 구축할 수 있습니다.
AI 서비스를 위한 FastAPI 통합
백엔드 개발자가 FastAPI를 사용하여 Genkit 플로우를 스트리밍 HTTP 엔드포인트로 노출하고, 실시간 AI 응답을 위한 SSE 지원을 내장할 수 있습니다.
Genkit 오류 디버깅
Genkit Python 앱을 유지보수하거나 업그레이드하는 개발자가 스킬에 문서화된 일반적인 오류, 모델 ID 문제, 임포트 문제를 참조할 수 있습니다.
이 프롬프트를 사용해 보세요
Help me set up a new Genkit Python project. Create a main.py file with Google AI plugin configured and a simple flow that summarizes text. Include instructions for running with genkit start.
Create a FastAPI application with Genkit that exposes a streaming chat endpoint. Use the genkit_fastapi_handler decorator and include a client-side JavaScript example using EventSource.
Create a Genkit application with three analysis flows (security, bugs, style) that run in parallel using asyncio.gather. Combine results into a single FastAPI endpoint.
Help me create a Genkit evaluator that uses an LLM judge model to score output quality. Include a dataset JSON file with test cases and CLI commands to run the evaluation.
모범 사례
- genkit start로 실행할 때는 asyncio.run(main()) 대신 항상 ai.run_main(main())을 사용하세요.
- 400 INVALID_ARGUMENT 오류를 방지하려면 모든 도구 함수 매개변수를 Pydantic BaseModel로 래핑하세요.
- 올바른 라우팅을 위해 플러그인 접두사가 포함된 모델 ID(예: googleai/gemini-flash-latest)를 사용하세요.
피하기
- await ai.generate_stream()을 사용하는 대신 동기적으로 호출하고 sr.stream을 반복 처리해야 합니다.
- Pydantic BaseModel 입력 타입 대신 기본 스칼라 매개변수로 도구 함수를 정의하는 것.
- @ai.tool() 데코레이터 대신 잘못된 @ai.define_tool() 데코레이터를 사용하는 것.