Questions tagged [openai-api]

OpenAI makes several AI products, including ChatGPT, Dall-E, Whisper. Use for questions about the OpenAI API, and not for general support.

Use for questions about using the OpenAI API. All question should be according to the scope of Stack Overflow and following the How to ask a good question and Expected Behavior guidelines.

Before asking a question, read the documentation.

If you will include non-original code, be sure to provide proper attribution.

Don't use for questions about using ChatGPT as an end-user. Don't use for questions about responses given by ChatGPT that aren't directly related to a programming issue using the OpenAI API.

Related tags:


OpenAI Community

https://community.openai.com/

1620 questions
0
votes
1 answer

When using the frame skipping wrapper for OpenAI Gym, what is the purpose of the np.max line?

I'm implementing the following wrapper used commonly in OpenAI's Gym for Frame Skipping. It can be found in dqn/atari_wrappers.py I'm very confused about the following line: max_frame = np.max(np.stack(self._obs_buffer), axis=0) I have added…
-1
votes
0 answers

Security of database credentials connecting Langchain with OpenAI

In LangChain you define the connection credentials to the database. Finally the "connection string" is passed to the OpenAI models. I consider it dangerous to share with OpenAI. server = 'server-name' database = 'db-name' username =…
Pool Nolasco
  • 93
  • 1
  • 6
-1
votes
0 answers

How to develop a site like mictogpt.com

I want to develop a site like mictogpt.com with Bootstrap/Jquery/Ajax, and PHP/CURL, but I don't understand how to transform the text responses provided by chatgpt into audio that the user can listen to, thank you for your help
-1
votes
0 answers

ChatGPT API: "You exceeded your current quota, please check your plan and billing details."

I tried to use ChatAPI API in flutter App. And This is the code that I use. Future getChatGPTResponse(String prompt) async { const apiKey = "~~~~~~~~~"; const apiUrl = "https://api.openai.com/v1/completions"; final headers = { …
Hyejung
  • 902
  • 1
  • 8
  • 22
-1
votes
0 answers

Trying to run this Poem API using the ChatGPT API in VSCode using OpenAI and Gradio

I am trying to program this chatbot that generates poems using a text file. Here is the code: import nltk import openai import gradio as gr import gradio_client from nltk.tokenize import word_tokenize from nltk.corpus import…
roTenshi2
  • 57
  • 6
-1
votes
0 answers

How do we create GPT prompt using openai in which we can get result from api

For example we have weather api, we have url https://weather.org/city=berlin and want to know weather news of 'berlin', so it hit the api, api has data like (Temperature: 14°C (57°F),Precipitation: 7% Humidity: 90%, Wind Speed: 11 km/h) and get…
-1
votes
2 answers

TypeError: OpenAIApi is not a constructor

i got error: const openai = new OpenAIApi({ key: apiKey }); ^ TypeError: OpenAIApi is not a constructor when I'm trying to create an openai api using nodejs (v16.7.0). I've followed the code in documentation and installed the openai…
-1
votes
0 answers

How to query in MongoDB with OpenAI API using NodeJS and MQL query e.g. "in col X tell me how many companies have Y"

Please the question is pretty straightforward so you don't need to close if you haven't clue about it. I have a collection data about companies in MongoDB, I have here a sample but it connects to MongoShell while I need it to be connected MongoDB…
Steven
  • 15
  • 4
-1
votes
1 answer

Issue with gpt 3.5 Turbo while putting my API key in a basic code

import openai import os import sys try: openai.api_key = os.environ['OPENAI_API_KEY'] except KeyError: sys.stderr.write(""" You haven't set up your API key yet. If you don't have an API key yet, visit: …
RDK
  • 1
-1
votes
0 answers

facing 401 when using axios to request openai aipi

Problem Description: I'm working on a React application that interacts with an external API using Axios. I'm encountering a "401 Unauthorized" error when making a POST request to the API's /api/conversation endpoint. I've double-checked my…
william
  • 1
  • 1
-1
votes
0 answers

Open API key throwing error on google colab

--------------------------------------------------------------------------- AuthenticationError Traceback (most recent call last) \ in \() \----\> 1 llms = llm.predict("hi!") 2…
-1
votes
0 answers

Inconsistent output on GPT-3.5 finetuned models

I am working with fine tuning on GPT 3.5. I have done a fairly good training (200 examples over 3 epochs). The model I am looking for basically receives a chunk of text with a question which should be answered with true or false. All my examples…
-1
votes
0 answers

Heroku Issues With Streamlit ElevenLabs Audio Implementation - Timeout & Connection Error

Having Issues with trying to deploy my Streamlit Python Program which uses 3 API Sets. ElevenLabs for Text-To-Speech, OpenAI from prompt to Story, HuggingFace Model from Image to Prompt. Everything worked perfectly locally. However this is my first…
-1
votes
1 answer

ChatGPT API Custom-trained AI Chatbot answering "None" to Python Query

I'm connecting to my first chatbot. Based on the process outlined here: https://beebom.com/how-train-ai-chatbot-custom-knowledge-base-chatgpt-api/ I created the code he suggested to get ChatGPT to analyze my PDF. The code was a bit outdated though,…
Geoff L
  • 765
  • 5
  • 22
-1
votes
0 answers

Handshake failed with fatal error SSL_ERROR_SSL: error:1000007d

I am working on an OpenAI API application using Chainlit for a website but when I run my command chainlit run main.py The server runs but there are errors or some warnings like this E0828 02:21:10.694000000 20136…