{"id":28439841,"url":"https://github.com/0verread/closecall","last_synced_at":"2025-06-15T04:06:06.871Z","repository":{"id":248619379,"uuid":"829089676","full_name":"0verread/closecall","owner":"0verread","description":"a lightweight npm package to keep llm calls within the relevant keywords.","archived":false,"fork":false,"pushed_at":"2024-07-21T19:49:40.000Z","size":72,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T03:06:15.382Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/closecall","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/0verread.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}},"created_at":"2024-07-15T18:26:30.000Z","updated_at":"2024-07-24T01:40:00.000Z","dependencies_parsed_at":"2024-07-18T04:07:32.826Z","dependency_job_id":"ea8a46e7-e04a-430c-a0ed-cd5f066289e0","html_url":"https://github.com/0verread/closecall","commit_stats":null,"previous_names":["0verread/tsuper","0verread/closecall"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0verread/closecall","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0verread%2Fclosecall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0verread%2Fclosecall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0verread%2Fclosecall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0verread%2Fclosecall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0verread","download_url":"https://codeload.github.com/0verread/closecall/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0verread%2Fclosecall/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259919455,"owners_count":22932071,"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","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":[],"created_at":"2025-06-06T03:06:15.846Z","updated_at":"2025-06-15T04:06:06.866Z","avatar_url":"https://github.com/0verread.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## closecall\n\na lightweight npm package to keep llm calls within the relevant keywords.\n\n### Use case\n\nAI-powered chatbots can be abused with irrelevant queries, making LLM cost higher and expensive. Use this simple package to keep your LLM calls within relevant keywords. \n\n### Usage\n\n1. Install the package\n```bash\nnpm i closecall\n```\n\n```js\nimport isPromptRelevant from \"closecall\";\n\nconst keywords = [\"Soccer\", \"game\", \"summer\", \"play\"]\nvar prompt = \"I want to play soccer\";\n\n\nconst MakeAPICall = async () =\u003e {\n  const isRelevant = await isPromptRelevant(prompt, keywords);\n  if(!isRelevant) {\n    throw new Error(\"Can't make API call with irrelevant prompt\");\n  } else {\n    // make api call\n  }\n  console.log(isRelevant)\n}\n```\n\n### License\n\nunder [MIT](LICENSE) License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0verread%2Fclosecall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0verread%2Fclosecall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0verread%2Fclosecall/lists"}