Use this tag with Generative Pre-trained Transformer 4 (GPT-4). Do not use it with GPT-2/3 or the ad tagging library (GPT).
Questions tagged [gpt-4]
55 questions
1
vote
1 answer
When using GPT-4 API, do I need to send the entire conversation back each time?
I'm new to OpenAI API. I work with GPT-3.5-Turbo, using this code:
messages = [
{"role": "system", "content": "You’re a helpful assistant"}
]
while True:
content = input("User: ")
if content == 'end':
…

Realchini
- 11
- 2
1
vote
1 answer
SQLDatabaseChain with GPT-4 returns SQL syntax error
I wrote a program trying to query local sqlite db, and it worked fine for text-davinci-003:
llm = OpenAI(model_name="text-davinci-003", verbose=True)
However, after I changed it to GPT-4:
llm = ChatOpenAI(model_name="gpt-4-0613",…

TaihouKai
- 133
- 11
1
vote
0 answers
Is there a way to access the history of API requests/calls made to my openAI account?
I just made ~2k api requests to GPT but my code errored out and did not save (therefore, the calls were made but never stored to code). Is there a way to retrieve the output of those calls?

skidjoe
- 493
- 7
- 16
1
vote
1 answer
OpenAI GPT-4 API: Why does gpt-4-0613 hallucinate (make up) function parameters?
I'm using the gpt-4-0613 model, with a single function, and some custom data in the system prompt.
If the function is triggered very early in the chat, within the first two requests, it functions just fine, and the API asks the user for the…

LJF 2525
- 11
- 1
1
vote
0 answers
How come azure openai models are faster than openai models?
I recently tried gpt-4 model with API calls to azure and openai. Noticed that time taken by models in azure is at least 2X faster.
What could be the reason behind this? Like has azure shared any details around this change in speed?

krish___na
- 692
- 7
- 14
1
vote
1 answer
OpenAI API: How do I handle errors in Python?
I tried using the below code, but the OpenAI API doesn't have the AuthenticationError method in the library. How can I effectively handle such error.
import openai
# Set up your OpenAI credentials
openai.api_key = 'YOUR_API_KEY'
try:
# Perform…

benjamin olise
- 95
- 1
- 7
1
vote
1 answer
GPT4 - Unable to get response for a question?
As the title clearly describes the issue I've been experiencing, I'm not able to get a response to a question from the dataset I use using the nomic-ai/gpt4all. The execution simply stops. No exception occurs. How can I overcome this situation?
p.s.…

talha06
- 6,206
- 21
- 92
- 147
1
vote
1 answer
How to change goals after setting up Auto-GPT
I have set up Auto-GPT in my system with the goals below.
1 Grow my linkedin account
2 Look for new innovative linkedin post ideas for AI technology
3 Prepare post on that idea
4 Write that post in the file
5 Shutdown
Auto GPT is not producing the…

Miralkumar Sojitra
- 36
- 8
1
vote
0 answers
word to word gpt api responce stream in react native
Is there a way to implement GPT API with word to word api
I already try implement in javascript directly into app but its not working
I want to use Chat GPT Turbo api directly in react native (expo) with word by word stream here is working example…

Saeed freelancer
- 11
- 1
1
vote
1 answer
Can I use a single ChatGPT-3 API key for multiple projects simultaneously?
I am a noobie programmer in college and I am trying to learn how to use API keys. I am currently using the ChatGPT-3 API for my Siri personal assistant project, and it's been working well for me so far.
Now, I am developing another application - a…

PartiMarti
- 21
- 5
0
votes
0 answers
gpt4 logit_bias not working as expected for multi-token words
I'm trying to block GPT-4 from saying a multi-token word but can't seem to do it.
How can I block the word? (It works for the single-token word "a" but not the multi-token word "truly")
I have tried blocking all prefixes of "Truly" and it won't even…

hello
- 5
- 2
0
votes
1 answer
OpenAI API error: "The requested module 'openai' does not provide an export named 'Configuration'"
I am facing this error while running my backend in my React app:
file:///D:/Project/server/route/dalle.routes.js:3
import { Configuration, OpenAIApi} from 'openai';
^^^^^^^^^^^^^
SyntaxError: The requested module 'openai' does not provide…

Abhishek
- 1
0
votes
1 answer
What is the difference between 'SQLDatabaseChain' and 'create_sql_agent' in langchain?
I'm creating a feature that uses 'LangChain' to turn user input questions into SQL.
I know that 'create_sql_agent' has logic to fix any errors in the query answered by 'openai'.
Is 'SQLDatabaseChain' not error correcting?
If so, can using…

ykoo
- 209
- 2
- 9
0
votes
0 answers
GPT-3.5 embedds but GPT-4 doesn't?
I am experiencing a bizarr problem. In my chat application which is able to download websites for documentation interaction, I am able to initalise the chat function properly with 3.5 turbo but when I change the model to 4, the app isn't able to…
0
votes
1 answer
What part of OpenAI API request payload is limited by the max amount tokens?
I kinda understand how to count tokens out of characters, but what do I actually have to count?
If I have a payload like this:
{
"model": "gpt-3.5-turbo",
"temperature": 1,
"max_tokens": 400,
"presence_penalty": 0.85,
"frequency_penalty":…

Arc
- 43
- 5