openai-api Questions

1

I have an Azure open AI Account and GPT4 model deployed. Can I use its API for image-to-text description? If yes, how I will give it the image? I am using this code. But it throws me an error. impo...
Bottali asked 8/5, 2023 at 10:32

1

I'm using the gpt-3.5-turbo model and sending the following message to the OpenAI API: What is the most beautiful country? I'm sending it as a JSON object: {"role":"user",&quo...
Cykana asked 27/5, 2023 at 15:29

1

Solved

This is from the official documentation from ChatGPT chat completion: openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=[ {"role": "system", "conte...
Hull asked 17/5, 2023 at 13:25

0

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...
Intake asked 15/5, 2023 at 0:52

4

Solved

I'm new to APIs and I'm trying to understand how to get a response from a prompt using OpenAI's GPT-3 API (using api.openai.com/v1/completions). I'm using Postman to do so. The documentation says t...
Spica asked 21/9, 2022 at 8:49

5

Solved

I'm making a Python script to use OpenAI via its API. However, I'm getting this error: openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing detail...
Tamworth asked 31/3, 2023 at 11:58

2

Solved

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 = &q...
Supereminent asked 4/5, 2023 at 12:51

3

I am using node.js and want to use openai API I just copied the code from openai playground and it looks like this export const askOpenAi = async () => { const response = await openai.createComp...
Consecutive asked 28/1, 2022 at 11:52

3

Solved

I am making a request to the completions endpoint. My prompt is 1360 tokens, as verified by the Playground and the Tokenizer. I won't show the prompt as it's a little too long for this question. He...
Dina asked 9/2, 2023 at 9:18

2

The langchain docs include this example for configuring and invoking a PydanticOutputParser # Define your desired data structure. class Joke(BaseModel): setup: str = Field(description="questi...
Linoleum asked 2/4, 2023 at 5:41

0

I have not found documentation regarding Question-Answering based on multiple text files, while referencing the text files individually. Example: I have file1.txt through file20.txt. file1.txt is f...
Shortchange asked 22/4, 2023 at 2:39

1

I'm trying to create the load_summarize_chain for Langchain using prompts that I created myself. llm = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0.7) PROMPT = PromptTemplate(temp...
Ebullience asked 12/4, 2023 at 22:36

2

I'm testing a couple of the widely published GPT models just trying to get my feet wet and I am running into an error that I cannot solve. I am running this code: from llama_index import SimpleDire...
Hygienist asked 3/4, 2023 at 22:27

2

Solved

I am trying to use langchain with gpt-35-turbo. It seems that the new gpt3.5 turbo is not using certain parameters anymore as per the link Learn how to work with the ChatGPT and GPT-4 models (previ...
Graphomotor asked 30/3, 2023 at 5:35

2

this is my function async function generateImage() { try { const response = await openai.createImage({ prompt: 'a white siamese cat', n: 1, size: '1024x1024', }); console.log(response); } c...
Claribelclarice asked 1/1, 2023 at 21:45

2

Solved

Here is my code snippet: const { Configuration, OpenAI, OpenAIApi } = require ("openai"); const configuration = new Configuration({ apiKey: 'MY KEY' }) const openai = new OpenAIApi(conf...
Callipygian asked 29/3, 2023 at 23:32

1

Solved

I am using Python 3.10 and FastAPI 0.92.0 to write a Server-Sent Events (SSE) stream api. This is how the Python code looks like: from fastapi import APIRouter, FastAPI, Header from src.chat.compl...
Quadruplicate asked 23/3, 2023 at 16:5

1

Note: The question was originally asking about the difference between the gpt-4 and gpt-4-0314. As of June 15, 2023, there are new snapshot models available (e.g., gpt-4-0613) so the question and i...
Disarm asked 22/3, 2023 at 9:57

1

I want to segment a video transcript into chapters based on the content of each line of speech. The transcript would be used to generate a series of start and end timestamps for each chapter. This ...

1

I thought the user parameter is doing this job. But it doesn’t work. https://platform.openai.com/docs/api-reference/chat
Delk asked 12/3, 2023 at 3:33

6

I am playing around with the openAI API and I am trying to continue a conversation. For example: import openai openai.api_key = mykey prompt= "write me a haiku" response = openai.Comp...
Superabound asked 7/12, 2022 at 2:31

1

Solved

I'm trying to use ChatGPT for my Telegram bot. I used to use "text-davinci-003" model, and it was working fine (even now it's working fine), but I'm not satisfied with its responses. Now ...
Lally asked 13/3, 2023 at 16:17

4

Solved

I have to fine-tune the OpenAI model on my custom dataset. I have created the dataset in jsonl format. I use the following commands on windows command line: set OPENAI_API_KEY=<API key> opena...
Trahan asked 16/6, 2022 at 10:16

1

Is there a way to train a Large Language Model (LLM) to store a specific context? For example, I had a long story I want to ask questions about, but I don't want to put the whole story in every pro...
Succory asked 19/2, 2023 at 15:38

1

I'm using customized text with 'Prompt' and 'Completion' to train new model. Here's the tutorial I used to create customized model from my data: beta.openai.com/docs/guides/fine-tuning/advanced-usa...
Tresa asked 8/10, 2022 at 19:58

© 2022 - 2024 — McMap. All rights reserved.