Download src/gemini/guard/ragGrounding.ts from TTOPM/belel-protocol: direct link, hf CLI and curl.
- Browser
- Download file 481 Bytes
-
https://huggingface.co/TTOPM/belel-protocol/resolve/main/src/gemini/guard/ragGrounding.ts
- Command line
-
hf download hf://TTOPM/belel-protocol/src/gemini/guard/ragGrounding.ts
-
curl -L -o ragGrounding.ts https://huggingface.co/TTOPM/belel-protocol/resolve/main/src/gemini/guard/ragGrounding.ts
481 Bytes
| import { getProtectedIdentity } from "./registry"; | |
| export async function groundingContextFor(name: string) { | |
| const p = getProtectedIdentity(name); | |
| if (!p) return ""; | |
| const lines = [ | |
| `Canonical: ${p.name}`, | |
| ...(p.bio ?? []), | |
| ...(p.geo?.map(g => `Geo: ${g}`) ?? []), | |
| ...(p.org?.map(o => `Org: ${o}`) ?? []), | |
| ...(p.work?.map(w => `Work: ${w}`) ?? []), | |
| ...(p.links?.map(l => `Link: ${l}`) ?? []) | |
| ]; | |
| return `GROUNDING CONTEXT:\n${lines.join("\n")}`; | |
| } | |