61 lines
2.0 KiB
Org Mode
61 lines
2.0 KiB
Org Mode
#+TITLE: SKILL: Gemini Provider Agent (Universal Literate Note)
|
|
#+ID: skill-provider-gemini
|
|
#+STARTUP: content
|
|
#+FILETAGS: :llm:provider:gemini:google:psf:
|
|
|
|
* Overview
|
|
The **Gemini Provider Agent** integrates Google's Gemini API as a pluggable System 1 (neural) backend. This skill enables modular updates to the Google backend while maintaining strict architectural alignment with the PSF.
|
|
|
|
* Phase A: Demand (PRD)
|
|
:PROPERTIES:
|
|
:STATUS: FROZEN
|
|
:END:
|
|
|
|
** 1. Purpose
|
|
Define the interface for reliable communication with the Google Gemini v1beta API.
|
|
|
|
** 2. User Needs
|
|
- **API Integration:** Implementation of the Gemini `contents.parts` protocol.
|
|
- **Reliability:** Secure retrieval of endpoints and API keys from the environment.
|
|
- **Modularity:** Registration under `:gemini-official` for multi-provider support.
|
|
|
|
** 3. Success Criteria
|
|
*** TODO API Authentication via URL Key
|
|
*** TODO Payload Construction
|
|
*** TODO Response Parsing Verification
|
|
|
|
* Phase B: Blueprint (PROTOCOL)
|
|
:PROPERTIES:
|
|
:STATUS: SIGNED
|
|
:END:
|
|
|
|
** 1. Architectural Intent
|
|
Interfaces for executing neural completion requests via Google's generative AI endpoints.
|
|
|
|
** 2. Semantic Interfaces
|
|
#+begin_src lisp
|
|
(defun execute-gemini-v1-request (prompt system-prompt)
|
|
"Executes a completion request via the Gemini API.")
|
|
#+end_src
|
|
|
|
* Phase D: Build (Implementation)
|
|
|
|
** Request Execution
|
|
#+begin_src lisp :tangle projects/org-skill-provider-gemini/src/provider-logic.lisp
|
|
(defun execute-gemini-v1-request (prompt system-prompt)
|
|
(let ((api-key (uiop:getenv "LLM_API_KEY"))
|
|
(endpoint (uiop:getenv "LLM_ENDPOINT")))
|
|
(unless api-key (return-from execute-gemini-v1-request "ERROR: Key missing"))
|
|
;; Physical API call logic (mocked for refactor)
|
|
(format nil "Executing Gemini request via ~a" endpoint)))
|
|
#+end_src
|
|
|
|
* Registration
|
|
#+begin_src lisp
|
|
(defskill :skill-provider-gemini
|
|
:priority 100
|
|
:trigger (lambda (context) nil)
|
|
:neuro (lambda (context) nil)
|
|
:symbolic (lambda (action context) action))
|
|
#+end_src
|