{"id":23651311,"url":"https://github.com/damiancipolat/node-open-ai-experiments","last_synced_at":"2025-11-15T15:30:17.846Z","repository":{"id":164184335,"uuid":"635175121","full_name":"damiancipolat/node-open-ai-experiments","owner":"damiancipolat","description":"In this repository I put together several examples of using openai to make small POCs of the apis","archived":false,"fork":false,"pushed_at":"2024-04-01T04:59:42.000Z","size":2009,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-28T16:36:21.582Z","etag":null,"topics":["chatbot","chatcompletion","gpt-3","gpt-3-5-turbo","gpt-4","llm","openai-api"],"latest_commit_sha":null,"homepage":"http://brigthbyte.com/","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/damiancipolat.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":"2023-05-02T06:03:01.000Z","updated_at":"2024-10-22T13:07:37.000Z","dependencies_parsed_at":"2024-02-23T05:22:40.659Z","dependency_job_id":"64785ec2-87d4-4848-88a5-4349f9dc053c","html_url":"https://github.com/damiancipolat/node-open-ai-experiments","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiancipolat%2Fnode-open-ai-experiments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiancipolat%2Fnode-open-ai-experiments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiancipolat%2Fnode-open-ai-experiments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiancipolat%2Fnode-open-ai-experiments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damiancipolat","download_url":"https://codeload.github.com/damiancipolat/node-open-ai-experiments/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239609085,"owners_count":19667801,"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":["chatbot","chatcompletion","gpt-3","gpt-3-5-turbo","gpt-4","llm","openai-api"],"created_at":"2024-12-28T16:36:58.096Z","updated_at":"2025-11-15T15:30:17.741Z","avatar_url":"https://github.com/damiancipolat.png","language":"JavaScript","readme":"# Node.js Project with Vanilla JS and OpenAI SDK\n\nThis project demonstrates how to use the OpenAI SDK with Node.js and Vanilla JavaScript to create natural language processing (NLP) applications.\n\n## Requirements\n\nBefore continuing, ensure you have the following installed on your system:\n\n- Node.js\n- npm\n- An OpenAI API key\n\n## Installation\n\nTo install the project, follow these steps:\n\n1. Clone this repository to your computer\n2. In the project folder, run `npm install` to install the dependencies.\n3. Create a `.env` file in the root of the project and add your OpenAI API key in a variable called `OPENAI_API_KEY`.\n\n## Usage\n\nThe project includes two examples of NLP functionalities using the OpenAI API: embeddings + textCompletion and chatCompletion.\n\n### Example 1: Embeddings + TextCompletion\n\nThis example uses the OpenAI API to generate a list of words similar to a given word using embeddings, and then uses the text completion function to generate a complete sentence from a user-entered seed text.\n\nTo try this example, run the following command in the terminal:\n\n```\ncd ask_a_test\nnode index.js\n```\n\n### Example 2: ChatCompletion\n\nThis example uses the OpenAI API to create an autocomplete chatbot that can respond to questions and have simple conversations with the user.\n\nTo try this example, run the following command in the terminal:\n\n```\ncd chat_completion\nnode example_1.js\nnode example_2.js\n```\n\nWe have some examples in this folder:\n\n- **example_1**: simple prompt, tell me a joke\n- **example_2**: simple prompt, remember your name\n- **example_3**: medium prompt, remember your name, recycle context to use as memory.\n\n### Order Bots\n\nIs a collection of some chatbots via console, to simulate a conversation\nwith a specific purposse\n\n```\ncd orderBot\nnpm start\n```\n\nWe have some examples in this folder:\n\n- **orderBot**: A chat bot to order a pizza.\n- **orderBot dinero**: A chat bot to buy electric scotters.\n\n### Chatbot server\n\nThis is a simple integration with twilio whatsapp and a nodejs server with express, with this code you can chat and share comments with the chatbot.\n**Note:** Add a .env file with the openai and twilio tokens and phone number.\n\n```\ncd chatbot-server\nnpm start\n```\n\n### calling_functions\n\nThere are some examples of how to user the function calling in openapi prompts,\nand mix the response with code execution.\n\n**Note:** Add a .env file with the openai and twilio tokens and phone number.\n\n```\ncd chatbot-server\nnpm start\n```\n\n## Conclusion\n\nThis project provides a simple demonstration of how to use the OpenAI SDK with Node.js and Vanilla JavaScript to create NLP applications. Feel free to experiment with different OpenAI API functions and use this project as a starting point for your own NLP projects.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamiancipolat%2Fnode-open-ai-experiments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamiancipolat%2Fnode-open-ai-experiments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamiancipolat%2Fnode-open-ai-experiments/lists"}