{"id":19267927,"url":"https://github.com/yav-ai/node.js-azure-openai-custom-tools-starter","last_synced_at":"2026-04-30T20:31:31.274Z","repository":{"id":231625857,"uuid":"781757543","full_name":"YAV-AI/Node.js-Azure-OpenAI-Custom-Tools-Starter","owner":"YAV-AI","description":"Implement Custom Tools with the Azure OpenAI service in Node.js using the OpenAI SDK.","archived":false,"fork":false,"pushed_at":"2024-04-04T02:18:36.000Z","size":3,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-23T19:44:56.519Z","etag":null,"topics":["azure","azureopenai","azureopenai-tool-call","function-calling","nodejs","openai","openai-api","openai-custom-tools","openai-node","openai-nodejs","openai-tool-call"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YAV-AI.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-04-04T01:18:51.000Z","updated_at":"2024-05-02T09:40:45.000Z","dependencies_parsed_at":"2024-04-05T01:52:01.488Z","dependency_job_id":"bd97ec01-a02e-4bd4-a681-8d5b08e17f5b","html_url":"https://github.com/YAV-AI/Node.js-Azure-OpenAI-Custom-Tools-Starter","commit_stats":null,"previous_names":["yav-ai/node.js-azure-openai-custom-tools-starter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YAV-AI/Node.js-Azure-OpenAI-Custom-Tools-Starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YAV-AI%2FNode.js-Azure-OpenAI-Custom-Tools-Starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YAV-AI%2FNode.js-Azure-OpenAI-Custom-Tools-Starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YAV-AI%2FNode.js-Azure-OpenAI-Custom-Tools-Starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YAV-AI%2FNode.js-Azure-OpenAI-Custom-Tools-Starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YAV-AI","download_url":"https://codeload.github.com/YAV-AI/Node.js-Azure-OpenAI-Custom-Tools-Starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YAV-AI%2FNode.js-Azure-OpenAI-Custom-Tools-Starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32476682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["azure","azureopenai","azureopenai-tool-call","function-calling","nodejs","openai","openai-api","openai-custom-tools","openai-node","openai-nodejs","openai-tool-call"],"created_at":"2024-11-09T20:14:30.309Z","updated_at":"2026-04-30T20:31:31.257Z","avatar_url":"https://github.com/YAV-AI.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure OpenAI NodeJS SDK Custom Tools Starter\n\n## Introduction\n\nThis example shows how to use Custom Tools using the Azure OpenAI service.\n\n## Setup and Configuration\n\n### Prerequisites\n\n- Node.js \u003e=18\n- Npm or Yarn\n- An active subscription with Azure OpenAI\n\n### Installation\n\n1. `git clone \u003cthis-repo\u003e`.\n2. Install dependencies by running `yarn` or `npm install` in the project root directory.\n\n### Setting up Credentials\n\nRename or copy `.env.sample` to `.env`\n\n```\nAZURE_OAI_RESOURCE_NAME=\"xxx-xxx-xxx-xxx\"\nAZURE_OAI_API_KEY=\"xxxxxxxxxxxx\"\nAZURE_OAI_API_VERSION=\"xxxx-xx-xx\"\nAZURE_OAI_DEPLOYMENT_NAME=\"the-deployment-name\"\n```\n\n## System Prompt\n\nIn this example we are asking the model to check the weather and reply strictly in JSON format with some clothing tips. The System prompt can be found in `./prompts/system.mjs`. Edit the prompt as per your requirements.\n\n## Custom Tools\n\n### Adding a New Tool\n\nTo add a new tool:\n\n1. Add the tool definitions in `./tools/definitions.mjs`.\n2. Add the tool function in `./tools/functions`.\n\n### Example Tool: Weather Information\n\nThe `getCurrentWeather` function fetches weather data for a specified location. It's invoked through the tool system during a conversation.\n\n## Usage\n\nThe function:\n\n```javascript\nconst theQuestion =\n  \"What's the weather like in San Francisco, Tokyo, and Paris?\";\n\naskAI(theQuestion)\n  .then((response) =\u003e {\n    //response.choices[0].message.content\n    console.log(response);\n  })\n  .catch(console.error);\n```\n\nRun the script:\n\n```\nnode index.mjs\n```\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Support\n\nFor support, open an issue in the GitHub repository or contact the project maintainers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyav-ai%2Fnode.js-azure-openai-custom-tools-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyav-ai%2Fnode.js-azure-openai-custom-tools-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyav-ai%2Fnode.js-azure-openai-custom-tools-starter/lists"}