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
3
votes
1 answer

How can I index the tables along with texts present in the pdf using Llamaindex and LangChain? (i am using Openai key)

def ask(file): print(" Loading...") PDFReader = download_loader("PDFReader") loader = PDFReader() documents = loader.load_data(file=Path(file)) print("Path: ", Path(file)) # Check if the index file exists if…
Harshit
  • 41
  • 2
3
votes
1 answer

Giving SystemMessage/Context to ConversationalRetrievalChain and ConversationBufferMemory in Lang Chain

I'm trying to build a chatbot that can chat about pdfs, and I got it working with memory using ConversationBufferMemory and ConversationalRetrievalChain like in this example.…
Hudson Etkin
  • 127
  • 2
  • 8
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
2 answers

OpenAI GPT-3 API: What is the difference between davinci and text-davinci-003?

I'm testing the different models for OpenAI, and I noticed that not all of them are developed or trained enough to give a reliable response. The models I tested are the following: model_engine = "text-davinci-003" model_engine = "davinci"…
Waly
  • 157
  • 1
  • 4
  • 12
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
1 answer

Langchain gpt-3.5-turbo models reads files - problem

I am making really simple (and for fun) LangChain project. A model can read PDF file and I can then ask him questions about specific PDF file. Everything works fine (this is working example) from PyPDF2 import PdfReader from…
devZ
  • 606
  • 1
  • 7
  • 23
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

Is it possible to access the history of calls done by LangChain LLM object to external API?

When we create an Agent in LangChain we provide a Large Language Model object (LLM), so that the Agent can make calls to an API provided by OpenAI or any other provider. For example: llm = OpenAI(temperature=0) agent = initialize_agent( …
Roman
  • 124,451
  • 167
  • 349
  • 456
3
votes
1 answer

Comparing methods for a QA system on a 1,000-document Markdown dataset: Indexes and embeddings with GPT-4 vs. retraining GPT4ALL (or similar)

I am working on a project to build a question-answering system for a documentation portal containing over 1,000 Markdown documents, with each document consisting of approximately 2,000-4,000 tokens. I am considering the following two options: Using…
Vasil Remeniuk
  • 20,519
  • 6
  • 71
  • 81
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
2 answers

whisper AI error : FP16 is not supported on CPU; using FP32 instead

I'm trying to use whisper AI on my computer. I have a NVIDIA GPU RTX 2060, installed CUDA and FFMPEG. I'm running this code : import whisper model = whisper.load_model("medium") result =…
3
votes
2 answers

sending audio file to open ai whisper model

I am converting my recorded audio file to a blob object and then reading it with file reader to make a post request to open ai whisper model It expects a audio file and model name i.e whisper-1 The error i am getting is 1 validation error for…
3
votes
1 answer

Getting missing pandas error while trying to fine-tune GPT3

I'm using the following command : openai tools fine_tunes.prepare_data -f ./data.jsonl and I'm getting the following error: Analyzing... Traceback (most recent call last): File "/Users/jyothiraditya/mambaforge/bin/openai", line 8, in
JYOTHIR
  • 51
  • 2