npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-openai-chatmodel

v1.0.2

Published

Custom n8n node for OpenAI Chat Model with response ID support

Readme

n8n-nodes-openai-chatmodel

Custom n8n node untuk OpenAI Chat Model dengan dukungan response ID dan conversation continuity.

Fitur

  • ✅ Integrasi dengan OpenAI API endpoint /v1/responses
  • ✅ Dukungan untuk response ID dan conversation continuity
  • ✅ Parameter input yang fleksibel
  • ✅ Konfigurasi model yang dapat disesuaikan
  • ✅ Opsi temperature, max tokens, dan parameter lainnya
  • ✅ Error handling yang komprehensif

Instalasi

Dari npm

npm install n8n-nodes-openai-chatmodel

Manual Installation

  1. Clone repository ini
  2. Build package:
    npm install
    npm run build
  3. Install ke n8n:
    npm install -g ./

Konfigurasi

1. Setup Credentials

  1. Buka n8n dan pergi ke Credentials
  2. Klik Add Credential dan pilih OpenAI API
  3. Masukkan:
    • API Key: API key OpenAI Anda
    • Organization ID (opsional): Organization ID OpenAI Anda

2. Menggunakan Node

  1. Tambahkan node OpenAI Chat Model ke workflow Anda
  2. Pilih credentials yang sudah dibuat
  3. Konfigurasi parameter:

Parameter Utama

  • Model: Pilih model OpenAI (GPT-4, GPT-4 Turbo, GPT-3.5 Turbo, atau Custom)
  • Input: Teks input yang akan dikirim ke model
  • Previous Response ID: ID response sebelumnya untuk continuity conversation (opsional)

Opsi Lanjutan

  • Temperature (0-2): Mengontrol randomness dalam response
  • Max Tokens: Maksimum token yang akan dihasilkan
  • Top P (0-1): Mengontrol diversity via nucleus sampling
  • Frequency Penalty (-2 to 2): Mengurangi kemungkinan mengulang kata yang sama
  • Presence Penalty (-2 to 2): Meningkatkan kemungkinan membahas topik baru
  • Include Response ID: Apakah menyertakan response ID dalam output

Contoh Penggunaan

Basic Chat

{
  "model": "gpt-3.5-turbo",
  "input": "Halo, bagaimana cara kerja AI?",
  "options": {
    "temperature": 0.7,
    "max_tokens": 500
  }
}

Conversation dengan Previous Response ID

{
  "model": "gpt-4",
  "input": "Lanjutkan pembahasan sebelumnya",
  "previous_response_id": "resp_abc123",
  "options": {
    "temperature": 0.5
  }
}

Output

Node akan mengembalikan object dengan struktur:

{
  "id": "resp_abc123",
  "object": "chat.completion",
  "model": "gpt-3.5-turbo",
  "created": 1677652288,
  "choices": [...],
  "usage": {
    "prompt_tokens": 56,
    "completion_tokens": 31,
    "total_tokens": 87
  },
  "message": {...},
  "content": "Response text here",
  "finish_reason": "stop"
}

Error Handling

Node akan menangani berbagai jenis error:

  • API Errors: Error dari OpenAI API dengan status code dan pesan
  • Network Errors: Error koneksi atau timeout
  • Validation Errors: Parameter yang tidak valid atau hilang

Development

Build

npm run build

Lint

npm run lint

Format

npm run format

Kontribusi

  1. Fork repository
  2. Buat feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push ke branch (git push origin feature/amazing-feature)
  5. Buat Pull Request

License

MIT License - lihat file LICENSE untuk detail.

Support

Jika Anda mengalami masalah atau memiliki pertanyaan:

  1. Buka issue di GitHub repository
  2. Sertakan informasi:
    • Versi n8n
    • Versi node
    • Error message (jika ada)
    • Langkah untuk reproduce masalah

Changelog

v1.0.0

  • Initial release
  • Dukungan OpenAI API endpoint /v1/responses
  • Parameter model, input, dan previous_response_id
  • Response ID support
  • Comprehensive error handling