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
4
votes
3 answers

How to keep the conversation going with OpenAI API PHP sdk

I'm trying to keep a conversation going using the completion() method with OpenAI PHP SDK. Prompt #1: "How Are You?" Prompt #2: "What I asked you before?" but the AI seems to forget what i asked before. and it reply with random answers to the…
Evil0x
  • 41
  • 1
  • 2
4
votes
1 answer

How request chat response with openai-node?

I'm using the node package, trying to get it to answer generic question with title + body (note: not Stack Overflow questions). Though I can't see how I'm supposed to do a "chat" request to GPT3. The closest I found is completion: const completion =…
ajthinking
  • 3,386
  • 8
  • 45
  • 75
4
votes
5 answers

How to get the items inside of an OpenAIobject in Python?

I would like to get the text inside this data structure that is outputted via GPT3 OpenAI. I'm using Python. When I print the object I get: JSON: { "choices": [ …
Katie Melosto
  • 1,047
  • 2
  • 14
  • 35
4
votes
1 answer

How can I give some hint phrases to OpenAI's Whisper ASR?

I use OpenAI's Whisper python lib for speech recognition. How can I give some hint phrases, as it can be done with some other ASR such as Google? To transcribe with OpenAI's Whisper (tested on Ubuntu 20.04 x64 LTS with an Nvidia GeForce RTX…
4
votes
2 answers

How do you implement OpenAI GPT-3 Api Client in PHP?

I need help understanding the vague instructions on https://packagist.org/packages/orhanerday/open-ai I downloaded the package from https://github.com/orhanerday/open-ai I installed the package by running "composer require orhanerday/open-ai" in my…
Overstack
  • 39
  • 1
  • 1
  • 5
4
votes
1 answer

Open AI generate longer text with GPT-3

I'm playing with the GPT-3 API of OPENAI but I struggle to find a way to make long enough generated text. Here is my piece of code : import os import openai # export OPENAI_API_KEY='get_key_from_openai' openai.api_key =…
Aydin Abiar
  • 334
  • 3
  • 11
4
votes
1 answer

GPT-3 fine tuning Error: Incorrect API key provided

I'm following this tutorial to fine-tune a GPT-3 model. However, when I run this part of the code: # Enter credentials %env OPENAI_API_KEY= "" !openai api fine_tunes.create \ -t dw_train.jsonl \ -v dw_valid.jsonl \ -m $model…
craftApprentice
  • 2,697
  • 17
  • 58
  • 86
4
votes
3 answers

How to fine tune fine tune GitHub Copilot?

We can fine tune language models like BERT, GPT-3. Can I fine tune GitHub Copilot model? I have already looked into examples from https://copilot.github.com/ but cant find the details. Would really appreciate if someone had fine tuned Github…
Exploring
  • 2,493
  • 11
  • 56
  • 97
4
votes
3 answers

Can I create a fine-tuned model for OpenAI API Codex models?

I'd like to translate user requests into tickets in some sort of structured data format, e.g. JSON. For example: User: I want to order two chairs and a desk with three drawers on the left side. Output: { "type": "furniture", "items": [ …
xaxa
  • 1,057
  • 1
  • 24
  • 53
4
votes
3 answers

openai.error.InvalidRequestError: Engine not found

Tried accessing the OpenAPI example - Explain code But it shows error as - InvalidRequestError: Engine not found enter code response = openai.Completion.create( engine="code-davinci-002", prompt="class Log:\n def __init__(self, path):\n …
AADARSH K
  • 81
  • 1
  • 6
4
votes
1 answer

Understand Adam optimizer intuitively

According the pseudo code of Adam: I wrote some code: from matplotlib import pyplot as plt import numpy as np # np.random.seed(42) num = 100 x = np.arange(num).tolist() # The following 3 sets of g_list stand for 3 types of gradient changes: #…
4
votes
1 answer

Encoding issues on OpenAI predictions after fine-tuning

I'm following this OpenAI tutorial about fine-tuning. I already generated the dataset with the openai tool. The problem is that the outputs encoding (inference result) is mixing UTF-8 with non UTF-8 characters. The generated model looks like…
4
votes
2 answers

OpenAI API and GPT-3, not clear how can I access or set up a learning/dev?

I am reading tons of GPT-3 samples, and came cross many code samples. None of them mentions that how and where I can run and play with the code myself... and especially not mentioning I can not. So I did my research, and concluded, I can not, but I…
g.pickardou
  • 32,346
  • 36
  • 123
  • 268
4
votes
1 answer

how to run env.render() in collab

NoSuchDisplayException Traceback (most recent call last) in () 3 env.reset() 4 for _ in range(1000): ----> 5 env.render() 6 env.step(env.action_space.sample()) # take a random action 7…
3
votes
1 answer

Error with model.list() in OpenAI Python Library

When attempting to use model.list(), the library encounters an authentication error due to the incorrect configuration of the API key. I've been continuously receiving the error message. import openai openai.api_key = "your_api_key" models =…