Use for questions about the OpenAI ChatGPT (i.e., GPT-3.5) API. Do not use it for questions about any other OpenAI API (GPT-3, GPT-4, etc.).
Questions tagged [chatgpt-api]
377 questions
0
votes
0 answers
OpenAI Chat completion, need response in list format instead of string for a travel itinerary
I am using the following python code to create a travel itinerary :
prompt = (f"Create a detailed travel itinerary from {start_date} to {end_date} spanning {num_days} days for {num_adults} adults "
f"This will be a round trip from…

FaisalShakeel
- 47
- 4
0
votes
0 answers
Using the same model for Function Calling and Enterprise Data Search
I am using Azure OpenAI function calling for some custom processing and responding in a natural way, but when I ask questions, which does not require custom processing, it should use the cognitive search to bring back the response as configured in…

Neeraj
- 158
- 8
0
votes
0 answers
Image overlay, hide edges of draggable tatto image in Dart Flutter
I want to create an image overlay application in flutter where there's a black container. Inside this container, I have two images: one is an arm image, which is stationary, and the other is a draggable tattoo image.
When I drag the tattoo image…

Hassnain Nisar
- 9
- 1
0
votes
1 answer
OpenAI ChatGPT (GPT-3.5) API: How do I make a fine-tuned GPT-3.5 model only answer from the fine-tuned data?
OpenAI now allows us to fine-tune GPT-3.5 models. I have tested and fine-tuned the model with my own dataset but the problem is the fine-tuned model generates the answer randomly, not correct based on my custom dataset.
Is there any way to make the…

DangTri
- 15
- 4
0
votes
0 answers
gpt4 logit_bias not working as expected for multi-token words
I'm trying to block GPT-4 from saying a multi-token word but can't seem to do it.
How can I block the word? (It works for the single-token word "a" but not the multi-token word "truly")
I have tried blocking all prefixes of "Truly" and it won't even…

hello
- 5
- 2
0
votes
0 answers
Next js Slow ChatGpt data streaming once deployed
It works fine locally the streaming is perfect. I have deployed it to the AWS server. It works but the data is too slow. Streaming is not working properly. There is an issue that delays for 1 to 2 sec. I am also using the Edge function in my code.…

Qaisar
- 33
- 8
0
votes
2 answers
OpenAI ChatGPT (GPT-3.5) API: How do I make the API return a completion faster?
I'm using the ChatGPT API to generate descriptions and short descriptions of many products. I developed a tool that can generate it, but it takes around 40 seconds to generate and create it.
I would like to know if there are solutions to optimize…

Nicolas
- 107
- 10
0
votes
0 answers
OpenAI API Unsupported Media Type (415 error)
** I am working on a custom chatbot using OPEN AI's APIs.I am trying to upload a file to OPEN AI api servers This is the endpoint I am using to post the upload request. Endpoint: https://api.openai.com/v1/files. I am getting this error: Error…

Waseem Abbas
- 3
- 2
0
votes
1 answer
OpenAI ChatGPT API - using sensor data
I have done a python program using the openai.ChatCompletion.create to interface to the ChatGPT API.
I am using a messages with two roles: user with the user prompt as content, and assistant loaded with current sensor data as content, which I get…

Gotfredsen
- 56
- 4
0
votes
0 answers
Chatgpt: ValueError: empty vocabulary; perhaps the documents only contain stop words
I am currently running the code and encountering the error mentioned above. Despite searching the internet, I have been unable to find a solution.
Code:
import json
import gensim
import pickle
import pandas as pd
import numpy as np
from tqdm import…

Khawar Islam
- 2,556
- 2
- 34
- 56
0
votes
0 answers
convert few shot learning example to API
I have made a little example of few shot sentiment analysis using the GUI of OPENAI and it seems to work reasonably well. I would now like to convert this into API code, but I am struggling to see a minimal example of how to do this.
On the GUI, I…

AJW
- 5,569
- 10
- 44
- 57
0
votes
1 answer
OpenAI API error: "The requested module 'openai' does not provide an export named 'Configuration'"
I am facing this error while running my backend in my React app:
file:///D:/Project/server/route/dalle.routes.js:3
import { Configuration, OpenAIApi} from 'openai';
^^^^^^^^^^^^^
SyntaxError: The requested module 'openai' does not provide…

Abhishek
- 1
0
votes
0 answers
Keep getting 400 Invalid File Form error from Whisper API
I am trying to call Whisper API from my android app. I am recording the audio and storing in .wav format. when i am calling the whisper API its always giving me 400 error saying invalid file format.
I tried playing the audio back and its working.…

Manoj ahirwar
- 1,062
- 1
- 10
- 24
0
votes
0 answers
Integrating Daily Updated Product Inventory with ChatGPT for Customized Responses
I am developing a chatbot using ChatGPT, which recommends recipes to users. A unique challenge I face is ensuring ChatGPT suggests recipes based solely on the ingredients we currently have in stock. Since our inventory changes daily, ChatGPT needs…
0
votes
1 answer
OpenAI API error: "OpenAIApi is not a constructor"
I want to integrate the ChatGPT API (i.e., GPT-3.5 API) into my application. I tried many ways, but I did not find a solution to my error.
My code:
require("dotenv").config();
const { Configuration, OpenAIApi } = require("openai");
const readline…

Nikita
- 11
- 2