Questions tagged [chatgpt-api]

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.).

377 questions
4
votes
1 answer

Determine whether OpenAI chat completion will execute function call or generate message

I currently have a chat feature in a NestJS application that uses the openai createChatCompletion API to generate a message based on user input and stream the response back to the client. With the addition of function calls to the openai API…
DeonV
  • 192
  • 6
4
votes
2 answers

OpenAI Chat Completions API: How do I customize answers from GPT-3.5 or GPT-4 models if I can't fine-tune them?

We have seen some companies use GPT-3.5 or GPT-4 models to train their own data and provide customized answers. But GPT-3.5 and GPT-4 models are not available for fine-tuning. I've seen the document from OpenAI about this issue, but I had seen…
Lucien
  • 43
  • 3
4
votes
1 answer

LlamaIndex with ChatGPT taking too long to retrieve answers

I am currently working on a chatbot for our website that provides domain knowledge using LlamaIndex and chatGPT. Our chatbot uses around 50 documents, each around 1-2 pages long, containing tutorials and other information from our site. While the…
Aggamarcel
  • 41
  • 4
4
votes
1 answer

Why am I getting a 401 error even though I am getting a response when linking my Next.js site with ChatGPT?

I am trying to incorporate ChatGPT into my practice e-commerce site to use it as a chatbot. I have imported openAI and added a function which sends a message to ChatGPT and then console logs the response. Upon running the site using npm run dev I…
4
votes
3 answers

OpenAI ChatGPT (GPT-3.5) API error 400: "Bad Request" (migrating from GPT-3 API to GPT-3.5 API)

Trying to call the got-3.5-turbo API that was just released for ChatGPT, but I'm getting a bad request error? var body = new { model = "gpt-3.5-turbo", messages = data …
Robert Benedetto
  • 1,590
  • 2
  • 29
  • 52
3
votes
1 answer

How to upload files with the OpenAI API

In order to make a fine-tuned ChatGPT model, we need to upload a JSON file of training data. The OpenAI doc for file upload is here: https://platform.openai.com/docs/api-reference/files/upload But... I don't see how to append the actual file…
Brian Risk
  • 1,244
  • 13
  • 23
3
votes
0 answers

Is there a way to stream OpenAI (chatGPT) responsse when using firebase cloud functions as a backend?

I'm currently building a chatbot using OpenAI's ChatGPT and Firebase Cloud Functions as the backend. I want to create a real-time chat experience where the responses from ChatGPT are streamed back to the client as they are generated. However, I'm…
3
votes
1 answer

Different answers from chatgpt-api and web interface

I'm trying to integrate openai (==0.27.6) into my system, and it works kinda fine, however, the replies I'm getting through the API are totally worse than the answers from the web interface (https://chat.openai.com/chat) . The way I'm using it with…
user2194805
  • 1,201
  • 1
  • 17
  • 35
3
votes
1 answer

Using Custom JSON data for context in Langchain and ConversationChain() in ChatGPT OpenAI

I have a custom JSON file which is created from an excel sheet which contains certain data on which I want my questions to be based on and off which I require answers from OpenAI. Now for this I have a piece of code as follows - s3 =…
3
votes
1 answer

Fix for Google-served ads on screens with replicated content

I have created an app based on ChatGPT OpenAI. I use their API to work as a chatbot. I had Google ads on my app working normally, but recently the ads has been restricted due a "Google-served ads on screens with replicated content" issue. My guess…
3
votes
1 answer

Azure Open AI Studio uploading Help Guide for data

We're wanting to take our help guide and use that to build training data to upload into Azure Open AI studio (Azure OpenAI Studio -> File Management). Is there any examples on taking a help/user guide and building data from that which we can feed…
Matt
  • 3,305
  • 11
  • 54
  • 98
3
votes
3 answers

Create multi-message conversations with the GPT API

I am experimenting with the GPT API by OpenAI and am learning how to use the GPT-3.5-Turbo model. I found a quickstart example on the web: def generate_chat_completion(messages, model="gpt-3.5-turbo", temperature=1, max_tokens=None): headers =…
dairy
  • 131
  • 2
  • 10
3
votes
2 answers

How does LlaMA index select nodes based on the query text?

When I query a simple vector index created using a LlaMA index, it returns a JSON object that has the response for the query and the source nodes (with the score) it used to generate an answer. How does it calculate which nodes to use? (I'm guessing…
shardgon
  • 33
  • 2
3
votes
2 answers

openai.error.APIConnectionError: Error communicating with OpenAI

when my project run this code it will return openai.error.APIConnectionError: Error communicating with OpenAI async def embeddings_acreate(input: list[str]): return await openai.Embedding.acreate( api_key=await…
Leon YAo
  • 31
  • 1
  • 3
3
votes
1 answer

Is it possible to handle stream api call in Angular using ChatGPT API?

Link to stackblitz project I made a mini app to work with chatgpt API(hide the api key). It works, however if the question/answer is too big, it takes much time or even exceeds the token limit of chatgpt. Is it possible to get the response in stream…
Konstantin Kim
  • 209
  • 1
  • 4
  • 18
1
2
3
24 25