{"id":29788561,"url":"https://github.com/lucasliet/phind-ai-provider","last_synced_at":"2025-10-04T15:04:42.129Z","repository":{"id":290838789,"uuid":"975719243","full_name":"lucasliet/phind-ai-provider","owner":"lucasliet","description":" phind ai provider compatible with vercel ai sdk ","archived":false,"fork":false,"pushed_at":"2025-08-29T20:16:42.000Z","size":109,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-01T09:23:15.110Z","etag":null,"topics":["ai","phind","provider","sdk","vercel"],"latest_commit_sha":null,"homepage":"https://jsr.io/@lucasliet/phind-ai-provider","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucasliet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-30T19:30:29.000Z","updated_at":"2025-08-29T20:16:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"35ba6daf-629c-4b77-bc66-fbbac28288fe","html_url":"https://github.com/lucasliet/phind-ai-provider","commit_stats":null,"previous_names":["lucasliet/phind-ai-provider"],"tags_count":0,"template":false,"template_full_name":"lucasliet/duckduckgo-ai-provider","purl":"pkg:github/lucasliet/phind-ai-provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasliet%2Fphind-ai-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasliet%2Fphind-ai-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasliet%2Fphind-ai-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasliet%2Fphind-ai-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasliet","download_url":"https://codeload.github.com/lucasliet/phind-ai-provider/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasliet%2Fphind-ai-provider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278328167,"owners_count":25968901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","phind","provider","sdk","vercel"],"created_at":"2025-07-27T21:02:01.393Z","updated_at":"2025-10-04T15:04:42.114Z","avatar_url":"https://github.com/lucasliet.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phind AI Provider\n\nUm provedor para o [Vercel AI SDK](https://sdk.vercel.ai/) que permite integrar facilmente o modelo de IA do Phind em suas aplicações JavaScript/TypeScript.\n\n[![License](https://img.shields.io/github/license/lucasliet/phind-ai-provider?logo=gitbook\u0026labelColor=%23262c31\u0026color=red\u0026logoColor=white)](LICENSE)\n[![JSR @lucasliet](https://jsr.io/badges/@lucasliet)](https://jsr.io/@lucasliet)\n[![tests](https://github.com/lucasliet/phind-ai-provider/actions/workflows/tests.yml/badge.svg)](https://github.com/lucasliet/phind-ai-provider/actions/workflows/tests.yml)\n[![publish](https://github.com/lucasliet/phind-ai-provider/actions/workflows/publish.yml/badge.svg)](https://github.com/lucasliet/phind-ai-provider/actions/workflows/publish.yml)\n[![JSR Version](https://img.shields.io/jsr/v/%40lucasliet/phind-ai-provider)](https://jsr.io/@lucasliet/phind-ai-provider)\n[![NPM](https://img.shields.io/npm/v/phind-ai-provider)](https://www.npmjs.com/package/phind-ai-provider)\n\n## Características\n\n- Compatível com o Vercel AI SDK (implementa `LanguageModelV1`)\n- Suporta chat e geração de texto via Phind\n- Suporte para ESM, CommonJS, UMD e Deno\n- Streaming de respostas em tempo real\n- Mínima dependência externa\n\n## Instalação\n\n### npm/Node.js\n\n```bash\nnpm install phind-ai-provider\n```\n\n### Deno (via JSR)\n\n```typescript\nimport { PhindAIService } from \"jsr:@lucasliet/phind-ai-provider\";\n```\n\n## Uso Básico\n\n```typescript\nimport { PhindAIService } from \"phind-ai-provider\";\nimport { generateText } from \"ai\";\n\nexport async function POST(req: Request) {\n  const { messages } = await req.json();\n  \n  const { text } = await generateText({\n    model: new PhindAIService(),\n    messages,\n  });\n  \n  return text;\n}\n```\n\n### Uso Direto (sem Vercel AI SDK)\n\n```typescript\nimport { PhindAIService } from \"phind-ai-provider\";\n\n// Uso síncrono\nasync function askQuestion() {\n  const phind = new PhindAIService();\n  const response = await phind.chat([\n    { role: \"user\", content: \"Qual é a capital da Suécia?\" }\n  ]);\n  console.log(response); // \"A capital da Suécia é Estocolmo.\"\n}\n\n// Uso com streaming\nasync function askQuestionWithReader() {\n  const phind = new PhindAIService();\n  const reader = await phind.chatReader([\n    { role: \"user\", content: \"Explique brevemente o que é inteligência artificial.\" }\n  ]);\n  \n  // Ler resposta em partes\n  const decoder = new TextDecoder();\n  while (true) {\n    const { done, value } = await reader.read();\n    if (done) break;\n    console.log(decoder.decode(value));\n  }\n}\n\n// Uso com streaming\nasync function askQuestionWithStreaming() {\n  const phind = new PhindAIService();\n  const stream = await phind.chatStream([\n    { role: \"user\", content: \"Explique brevemente o que é inteligência artificial.\" }\n  ]);\n  \n  for await (const chunk of stream) {\n    console.log(chunk);\n  }\n}\n```\n\n## Opções Avançadas\n\n### Modelos\n\nO Phind tem diferentes modelos disponíveis. Por padrão, usamos o \"Phind-70B\", pois é o único modelo gratuito atualmente:\n\n```typescript\n// Use o modelo Phind-70B (padrão)\nconst model = new PhindAIService();\n\n// Ou especifique outro modelo\nconst model = new PhindAIService(\"Phind-405B\"); // Atualmente Phind-70B é o único modelo gratuito\n```\n\n## Compatibilidade\n\nEste pacote funciona em:\n\n- Node.js (ESM e CommonJS)\n- Navegadores (ESM e UMD)\n- Deno (via JSR)\n- Bun\n- Ambientes edge (Vercel Edge Runtime, Cloudflare Workers, etc.)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasliet%2Fphind-ai-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasliet%2Fphind-ai-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasliet%2Fphind-ai-provider/lists"}