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
-1
votes
2 answers

Next.js OpenAI post Request route

I have been really struggling with getting this POST request to work when trying out the create chat completion endpoint from the OpenAI API. For context, I began following a YouTube tutorial (Link here but when I got to creating the API route, my…
-1
votes
0 answers

I had a functional gpt-4 model using only data from a chroma duckdb, now it no longer works and just functions as a regular chat model

Here is the code import os import constants import chromadb import PySimpleGUI as sg from langchain.chat_models import ChatOpenAI from langchain.chains import ConversationalRetrievalChain from langchain.vectorstores import Chroma from…
-1
votes
0 answers

Langchain Chatbot validation Error with custom template

I am trying to create simpl chatbot with Langchain and want to store conversation history as well but it's throwing error while reading data.json while using qa_chain to render chain conversation. instance of VectorStore expected…
BJ Coder
  • 350
  • 5
  • 16
-1
votes
2 answers

How to intercept multiple backticks notation in OpenAI response

I have written a simple OpenAI based chatbot in JS, but i want to intercept the backticks indicating the language in the chatbot response... in both opening and close I have tried multiple regexes, i came out with the following: fetch(API_URL,…
MrCoder74
  • 40
  • 4
-1
votes
0 answers

How can chatGPT interact with an ERP SQL database in real-time fashion?

I'd like to simulate a salesman. Let's say a customer asks "Hello, do you have this product?"... How can chatGPT provide the answer based on the ERP database? How can it give the available stock and prices? I've seen that you can "train" chatGPT by…
Ivan
  • 1,967
  • 4
  • 34
  • 60
-1
votes
0 answers

How to prepare training data for OpenAI

I am trying to train a model in Open AI. However the training data is not working. Example - "Set an interview for 15th August 2023." I should be getting a JSON response like below. { "intent": "schedule_interview", "entities": [ { …
Arnab
  • 195
  • 2
  • 14
-1
votes
0 answers

how do I make my chatGPT 3.5 turbo API integrated langchain chatbot ask a particular set of questions?

I am facing an issue where I cannot determine how to make the chatbot ask a particular set of questions from the user, then take all of that data to produce a response and store it for future reference. I am using ChatGPT 3.5-turbo API and…
-1
votes
0 answers

Error in openai : Error communicating with OpenAI: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

Code: response = openai.ChatCompletion.create( timeout=10, deployment_id=deployment_name, model="gpt-3.5-turbo", # The name of the OpenAI chatbot model to use messages=message_log, # The conversation history up to…
krisskad
  • 131
  • 9
-1
votes
0 answers

I am having a problem importing from my directory

My directory structure is fine, this is like a simple overview: project_root/ ├── your_script.py ├── services/ │ ├── api/ │ │ ├── openAI.py │ ├── hardware/ │ │ ├── input_sound_handler.py │ │ ├── output_sound_handler.py These lines…
-1
votes
1 answer

Cannot access local variable 'content' where it is not associated with a value

I am new to Flask and I am trying to make a blog post generating bot with the GPT and the DALL-E API. But no matter what I try I always get UnboundLocalError: cannot access local variable 'content' where it is not associated with a value Can…
-1
votes
1 answer

How to get "text-embedding-ada-002"?

I can get this model only with openai api-key? I can get full vocabulary of token embeddings? I can download this model or no? I cant get information for this in different sources for a long time. Sorry, my English is bad...
-1
votes
0 answers

Why do I can't fetch data from openai using vite (post 400 error, Refused to set unsafe header "User-Agent")

My code : import { useState } from 'react' import './App.css' import {Configuration, OpenAIApi} from "openai" const configuration = new Configuration ({ apiKey: import.meta.env.VITE_API_KEY }) const openai = new…
-1
votes
1 answer

How can I use cheerio web scraper as an agent tool in Flowise?

I am developing a small project on Flowise and I need to use Cheerio web scraper as a tool for agent. How can I do this? Or is there any way or tool to do in python langchain app when I give the website url, it scraps and give me the all text?
batuhan
  • 19
  • 1
  • 2
-1
votes
0 answers

OpenAI api is not working after i changed the api

void callAPIs(String personalityType, String weightCount) async { ImageService imageService = ImageService(); String gptPrompt = "Analyze My personality type and create a stable diffusion prompt. Do not ever write a word except the…
-1
votes
0 answers

cannot access openai from centos8 vm

Issue I'm running centos8 redhat in a virtual box and had my OpenVPN running correctly. The question is all the pages related with openAI, curl gets nothing and I got the error: curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to…
stevewu
  • 37
  • 4
1 2 3
99
100