# \#javascript

**URL:** https://community.openai.com/tag/javascript/422.md

[Latest](https://community.openai.com/latest.md) · [Categories](https://community.openai.com/categories.md) · [Tags](https://community.openai.com/tags.md)

---

## [Entering "toString" causes content load failure in ChatGPT UI](https://community.openai.com/t/entering-tostring-causes-content-load-failure-in-chatgpt-ui/1375548)

<div class="topic-metadata">

**Author:** [@moniruzzamansaikat](https://community.openai.com/u/moniruzzamansaikat)\
**Replies:** 2\
**Last updated:** [May 12, 2026, 2:40pm UTC](https://community.openai.com/t/entering-tostring-causes-content-load-failure-in-chatgpt-ui/1375548 "2026-05-12T14:40:23Z")

</div>

Hi, I’m encountering a UI issue in ChatGPT when entering a very simple input. Steps to reproduce: Open ChatGPT in browser. Type toString Press Enter. Expected behavior: The message should be processed norm…

---

## [How to send PDF to extract details](https://community.openai.com/t/how-to-send-pdf-to-extract-details/1313470)

<div class="topic-metadata">

**Author:** [@tjhoo](https://community.openai.com/u/tjhoo)\
**Replies:** 3\
**Last updated:** [July 12, 2025, 1:34pm UTC](https://community.openai.com/t/how-to-send-pdf-to-extract-details/1313470 "2025-07-12T13:34:13Z")

</div>

Hi, Currently I’m using docling to convert PDF to Markdown before I feed it to GPT-4.1 to extract the details into JSON format. May I know if I can use OpenAI JavaScript API to send the PDF to OpenAI model directly and…

---

## [Unexpected string response for embedding field using text-embedding-3-small API in Node.js SDK](https://community.openai.com/t/unexpected-string-response-for-embedding-field-using-text-embedding-3-small-api-in-node-js-sdk/1311502)

<div class="topic-metadata">

**Author:** [@Kha\_Nguy\_n\_Le\_Hoang](https://community.openai.com/u/Kha_Nguy_n_Le_Hoang)\
**Replies:** 1\
**Last updated:** [July 9, 2025, 1:48pm UTC](https://community.openai.com/t/unexpected-string-response-for-embedding-field-using-text-embedding-3-small-api-in-node-js-sdk/1311502 "2025-07-09T13:48:42Z")

</div>

Hi everyone, I’m encountering an unexpected issue when calling the text-embedding-3-small model using the Node.js OpenAI SDK. Instead of receiving an array of numbers for the embedding field, I’m getting what looks like…

---

## [Your feedback requested: Node.js SDK 5.0.0 alpha](https://community.openai.com/t/your-feedback-requested-node-js-sdk-5-0-0-alpha/1063774)

<div class="topic-metadata">

**Author:** [@kwhinnery](https://community.openai.com/u/kwhinnery)\
**Replies:** 7\
**Last updated:** [March 21, 2025, 5:46am UTC](https://community.openai.com/t/your-feedback-requested-node-js-sdk-5-0-0-alpha/1063774 "2025-03-21T05:46:58Z")

</div>

Hey everyone! We’re pleased to share that a new alpha of the 5.0.0 version of the JavaScript / TypeScript SDK is available on npm and in the alpha branch of the GitHub repository. This version of the SDK represents a b…

---

## [Introducing Swarm.js: Node.js Implementation of OpenAI Swarm!](https://community.openai.com/t/introducing-swarm-js-node-js-implementation-of-openai-swarm/977510)

<div class="topic-metadata">

**Author:** [@youseai.startup](https://community.openai.com/u/youseai.startup)\
**Replies:** 5\
**Last updated:** [February 19, 2025, 2:15am UTC](https://community.openai.com/t/introducing-swarm-js-node-js-implementation-of-openai-swarm/977510 "2025-02-19T02:15:18Z")

</div>

Hey everyone! :waving\_hand: I’m excited to share Swarm.js, a lightweight Node.js SDK for orchestrating multi-agent systems using OpenAI’s API. It’s an educational framework inspired by the OpenAI Swarm (originally built…

---

## [Whisper API not transcribing audio files coming from an iphone](https://community.openai.com/t/whisper-api-not-transcribing-audio-files-coming-from-an-iphone/647235)

<div class="topic-metadata">

**Author:** [@aristico94](https://community.openai.com/u/aristico94)\
**Replies:** 10\
**Last updated:** [December 18, 2024, 5:48am UTC](https://community.openai.com/t/whisper-api-not-transcribing-audio-files-coming-from-an-iphone/647235 "2024-12-18T05:48:32Z")

</div>

Hi, I am recording audio on the browser using MediaRecorder and sending the file to openai whisper api for transcription and for some reason it would only pick up one word and other times just a bunch of random character…

---

## [Visualize Swarm Like Multi Agents AI Systems Introducing An Online Tool](https://community.openai.com/t/visualize-swarm-like-multi-agents-ai-systems-introducing-an-online-tool/983582)

<div class="topic-metadata">

**Author:** [@deepnlp](https://community.openai.com/u/deepnlp)\
**Replies:** 0\
**Last updated:** [October 18, 2024, 3:33am UTC](https://community.openai.com/t/visualize-swarm-like-multi-agents-ai-systems-introducing-an-online-tool/983582 "2024-10-18T03:33:56Z")

</div>

Hi guys, I would like to share an online visualization tool (Dialogue Visualization Tool DeepNLP) which is helpful when developing Multi Agents systems calling OpenAI APIs (github: AI-Hub-Admin/AI-Agents-Visualization). …

---

## [Integrating OpenAI Assistant with NestJS](https://community.openai.com/t/integrating-openai-assistant-with-nestjs/889982)

<div class="topic-metadata">

**Author:** [@sebastian.musial](https://community.openai.com/u/sebastian.musial)\
**Replies:** 1\
**Last updated:** [August 1, 2024, 1:45pm UTC](https://community.openai.com/t/integrating-openai-assistant-with-nestjs/889982 "2024-08-01T13:45:06Z")

</div>

Hey everyone, I’ve recently started exploring the integration of OpenAI assistants with NestJS for one of my projects. I’m curious about how others have approached this. A few questions to kick things off: Are there …

---

## [Fetching a dall-e 3 url and converting it into base64](https://community.openai.com/t/fetching-a-dall-e-3-url-and-converting-it-into-base64/787775)

<div class="topic-metadata">

**Author:** [@guccidief](https://community.openai.com/u/guccidief)\
**Replies:** 4\
**Last updated:** [June 11, 2024, 12:34pm UTC](https://community.openai.com/t/fetching-a-dall-e-3-url-and-converting-it-into-base64/787775 "2024-06-11T12:34:50Z")

</div>

Hi everyone, I’m currently integrating the OpenAI DALL-E API into my project, but I’m encountering persistent CORS (Cross-Origin Resource Sharing) errors. It seems like my requests might be missing some necessary header…

---

## [Astro & JSX scripts are empty](https://community.openai.com/t/astro-jsx-scripts-are-empty/728331)

<div class="topic-metadata">

**Author:** [@dumbooctopusstudios](https://community.openai.com/u/dumbooctopusstudios)\
**Replies:** 1\
**Last updated:** [May 14, 2024, 5:02pm UTC](https://community.openai.com/t/astro-jsx-scripts-are-empty/728331 "2024-05-14T17:02:55Z")

</div>

Provided code snippets from chatgpt are empty for JSX and Astro code. The AI starts writing some comments then starts the code but once it comes to the component in my code it doesn’t show anything in my side although …

---

## [Can I do content script and extract chat gpt responses? cuz I am doing a project which involves extracting chatgpt responses? But when I did it using js it tells the target element didnt exist even If the element exist before that code gets executed](https://community.openai.com/t/can-i-do-content-script-and-extract-chat-gpt-responses-cuz-i-am-doing-a-project-which-involves-extracting-chatgpt-responses-but-when-i-did-it-using-js-it-tells-the-target-element-didnt-exist-even-if-the-element-exist-before-that-code-gets-executed/748571)

<div class="topic-metadata">

**Author:** [@domesandms](https://community.openai.com/u/domesandms)\
**Replies:** 0\
**Last updated:** [May 14, 2024, 2:46pm UTC](https://community.openai.com/t/can-i-do-content-script-and-extract-chat-gpt-responses-cuz-i-am-doing-a-project-which-involves-extracting-chatgpt-responses-but-when-i-did-it-using-js-it-tells-the-target-element-didnt-exist-even-if-the-element-exist-before-that-code-gets-executed/748571 "2024-05-14T14:46:00Z")

</div>

// Evaluate the XPath expression to select the target paragraph element const targetParagraph = document.evaluate( ‘//\*\[@id=“\_\_next”\]/div\[1\]/div\[2\]/main/div\[2\]/div\[1\]/div/div/div/div/div\[3\]/div/div/div\[2\]/div\[2\]/div\[1\]…

---

## [Obtaining and displaying token usage on web page](https://community.openai.com/t/obtaining-and-displaying-token-usage-on-web-page/555791)

<div class="topic-metadata">

**Author:** [@oleteacher](https://community.openai.com/u/oleteacher)\
**Replies:** 8\
**Last updated:** [May 14, 2024, 6:14am UTC](https://community.openai.com/t/obtaining-and-displaying-token-usage-on-web-page/555791 "2024-05-14T06:14:21Z")

</div>

I have spent some time reading over other threads but not finding what I need to get started. If I have missed answer here pot OpenAI API docs, please forgive this poor eye-sight gal:) When I call openai with my example…

---

## [Encountering "Invalid URL" Error When Creating Conversation Threads with Assistant API](https://community.openai.com/t/encountering-invalid-url-error-when-creating-conversation-threads-with-assistant-api/740821)

<div class="topic-metadata">

**Author:** [@ewige.liebe.yt](https://community.openai.com/u/ewige.liebe.yt)\
**Replies:** 0\
**Last updated:** [May 9, 2024, 2:32pm UTC](https://community.openai.com/t/encountering-invalid-url-error-when-creating-conversation-threads-with-assistant-api/740821 "2024-05-09T14:32:00Z")

</div>

I’m experiencing an issue with the Assistant API when trying to create a conversation thread. The error message returned is: Invalid URL (POST /v1/assistants/{assistant\_id}/threads) It seems like the assistant ID is re…

---

## [Concatenated streaming packages in API response (recent change & simple fix) \[svelte/javascript\]](https://community.openai.com/t/concatenated-streaming-packages-in-api-response-recent-change-simple-fix-svelte-javascript/726753)

<div class="topic-metadata">

**Author:** [@lpm](https://community.openai.com/u/lpm)\
**Replies:** 2\
**Last updated:** [April 24, 2024, 6:50pm UTC](https://community.openai.com/t/concatenated-streaming-packages-in-api-response-recent-change-simple-fix-svelte-javascript/726753 "2024-04-24T18:50:53Z")

</div>

Hi all, Disclaimer: I’m not the best Javascript dev, so feel free to contribute any improvements for anyone having the same issue Recently a Svelte app I use started having some issues parsing out the JSON packages r…

---

## [Unable to find content for text generation using models locally(also fine tuning) in nodejs](https://community.openai.com/t/unable-to-find-content-for-text-generation-using-models-locally-also-fine-tuning-in-nodejs/717913)

<div class="topic-metadata">

**Author:** [@suraj99](https://community.openai.com/u/suraj99)\
**Replies:** 0\
**Last updated:** [April 15, 2024, 7:17am UTC](https://community.openai.com/t/unable-to-find-content-for-text-generation-using-models-locally-also-fine-tuning-in-nodejs/717913 "2024-04-15T07:17:56Z")

</div>

HI, I m new to ML or AI, just started learning so my task is to make text generation model using models(LOCALLY in our system for data privacy) like gpt2 or any other that present on internet and then fine tune them by…

---

## [How Can I use threadID, assistants, and function tool calling at the same time?](https://community.openai.com/t/how-can-i-use-threadid-assistants-and-function-tool-calling-at-the-same-time/659850)

<div class="topic-metadata">

**Author:** [@MatthewGerges](https://community.openai.com/u/MatthewGerges)\
**Replies:** 0\
**Last updated:** [February 29, 2024, 6:27am UTC](https://community.openai.com/t/how-can-i-use-threadid-assistants-and-function-tool-calling-at-the-same-time/659850 "2024-02-29T06:27:43Z")

</div>

Hi all, I am trying to create an AI chatbot (using the assistant’s API that answers user questions (so it would be a continuous conversation). The chatbot should call API requests if the user asks for something specific …

---

## [Stream text to speech in chunks but my chunks are coming to fast](https://community.openai.com/t/stream-text-to-speech-in-chunks-but-my-chunks-are-coming-to-fast/646717)

<div class="topic-metadata">

**Author:** [@acro](https://community.openai.com/u/acro)\
**Replies:** 1\
**Last updated:** [February 22, 2024, 12:50am UTC](https://community.openai.com/t/stream-text-to-speech-in-chunks-but-my-chunks-are-coming-to-fast/646717 "2024-02-22T00:50:26Z")

</div>

Im using openai.chat.completions with stream: true to create a streamed response from the chat. It outputs chunks which I am sending to my textToSpeech function. This function does create a audio but the chunks are all i…
