id stringlengths 7 11 | source stringclasses 1
value | category stringclasses 11
values | title stringlengths 15 214 | text stringlengths 70 30.5k | url stringlengths 57 160 | tags stringlengths 3 113 | created_at int64 1.22B 1.79B |
|---|---|---|---|---|---|---|---|
se_78383952 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAi vue3 pinecone/zilliz php/laravel | OpenAi vue3 pinecone/zilliz php/laravel
what is the right way to implement search using vue3 or laravel/php via openai which is using pinecone/zilliz vector database?
i've read many information about all of this, everything in wirking well using python but not this stack | https://stackoverflow.com/questions/78383952/openai-vue3-pinecone-zilliz-php-laravel | laravel, vuejs3, laravel-8, openai-api, vector-database | 1,714,040,544 |
se_79279995 | stackoverflow | ARTIFICIAL_INTELLIGENCE | C# ASP.NET MVC web app - update view after completion of asynch calls w/ OpenAI | C# ASP.NET MVC web app - update view after completion of asynch calls w/ OpenAI
I have an ASP.NET MVC app in C# that I'm trying to asynchronously call a bunch of OpenAI requests in parallel and then wait on all results to return.
The following is a snippet from this code:
foreach (ChatMessage msg in messages)
... | https://stackoverflow.com/questions/79279995/c-asp-net-mvc-web-app-update-view-after-completion-of-asynch-calls-w-openai | c#, openapi, openai-api, chatgpt-api | 1,734,145,552 |
se_79087174 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Calculate audio tokens for Openai's realtime API | Calculate audio tokens for Openai's realtime API
I am trying to find a way to calculate billable audio tokens for my Realtime API usage on OpenAI's API.
I can see aggregated usage costs on OpenAi's dashboard for my api keys but would like to get more granular data on a per API request. | https://stackoverflow.com/questions/79087174/calculate-audio-tokens-for-openais-realtime-api | openai-api | 1,728,927,424 |
se_75817155 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API in a Laravel project (backend implementation doesn't work) | OpenAI API in a Laravel project (backend implementation doesn't work)
I am currently trying to use this API : https://github.com/openai-php/laravel in a personal Laravel project.
I don’t really know what is currently wrong in my code, all I can say is that the code detailed below gets my message displayed in the c... | https://stackoverflow.com/questions/75817155/openai-api-in-a-laravel-project-backend-implementation-doesnt-work | javascript, php, laravel, openai-api | 1,679,518,142 |
se_79268425 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How should examples be formatted for one-shot or few-shot prompting when using OpenAI's structured output? | How should examples be formatted for one-shot or few-shot prompting when using OpenAI's structured output?
When using OpenAI's structured outputs, should the examples in one-shot or few-shot prompting follow the JSON format of the structured output before parsing?
For example, consider the code below using one-sho... | https://stackoverflow.com/questions/79268425/how-should-examples-be-formatted-for-one-shot-or-few-shot-prompting-when-using-o | openai-api, prompt, chatgpt-api, gpt-4 | 1,733,837,326 |
se_77505030 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API error: "You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0" | OpenAI API error: "You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0"
I am currently working on a chatbot, and as I am using Windows 11 it does not let me migrate to newer OpenAI library or downgrade it. Could I replace the ChatCompletion function with something e... | https://stackoverflow.com/questions/77505030/openai-api-error-you-tried-to-access-openai-chatcompletion-but-this-is-no-lon | python, pip, artificial-intelligence, openai-api, chatgpt-api | 1,700,262,548 |
se_79268130 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI Assistants API: Is there an API endpoint to list all existing thread IDs? | OpenAI Assistants API: Is there an API endpoint to list all existing thread IDs?
What is a workaround to list all thread IDs from the OpenAI developer platform (https://platform.openai.com/threads/) using JavaScript?
There is no official API to list all available threads.
I found answers about the v1 API. It's also po... | https://stackoverflow.com/questions/79268130/openai-assistants-api-is-there-an-api-endpoint-to-list-all-existing-thread-ids | javascript, openai-api, openai-assistants-api | 1,733,831,375 |
se_79264373 | stackoverflow | ARTIFICIAL_INTELLIGENCE | pins controller uploading duplicates of image rails | pins controller uploading duplicates of image rails
I'm stuck uploading 2 copies of each image
i guess im gong to add a way to remove sepearte images but for now how do i stop duplicates?
some help getting through the double vision would help. im almost sure its in the controller
pins controller
class PinsController <... | https://stackoverflow.com/questions/79264373/pins-controller-uploading-duplicates-of-image-rails | ruby-on-rails, ruby, artificial-intelligence, openai-api | 1,733,735,000 |
se_70060847 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to work with OpenAI maximum context length is 2049 tokens? | How to work with OpenAI maximum context length is 2049 tokens?
I'd like to send the text from various PDF's to OpenAI's API. Specifically the Summarize for a 2nd grader or the TL;DR summarization API's.
I can extract the text from PDF's using PyMuPDF and prepare the OpenAI prompt.
Question: How best to prepare the pro... | https://stackoverflow.com/questions/70060847/how-to-work-with-openai-maximum-context-length-is-2049-tokens | python, openai-api | 1,637,554,746 |
se_79264911 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI Assistants API: Is the whole thread with all the past messages sent to the API every time I add a new message to the thread? | OpenAI Assistants API: Is the whole thread with all the past messages sent to the API every time I add a new message to the thread?
While I was using the Chat Completions API, I learned that you need to include the trail of the questions from the user and answers from the OpenAI API (including the system messages) whe... | https://stackoverflow.com/questions/79264911/openai-assistants-api-is-the-whole-thread-with-all-the-past-messages-sent-to-th | openai-api, chatgpt-api, openai-assistants-api | 1,733,746,056 |
se_76563724 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Is there a way to reduce the number of tokens sent to chatgpt (as context)? | Is there a way to reduce the number of tokens sent to chatgpt (as context)?
I'm using chatgpt's API to discuss book topics. In order for chatgpt to understand the whole story I had to add context.
This means that all user questions and chatgpt replies are sent with the same request. Thus very quickly reaching the maxi... | https://stackoverflow.com/questions/76563724/is-there-a-way-to-reduce-the-number-of-tokens-sent-to-chatgpt-as-context | openai-api, chatgpt-api | 1,687,860,037 |
se_79263347 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAi api | How can I answer a question with an "uploaded" PDF | OpenAi api | How can I answer a question with an "uploaded" PDF
I’m working on a Python project where I use OpenAI's GPT-4 API to analyze data from screenshots and PDFs.
My goal is to send the request with the screenshot and the PDF (Both in a single request) to the gpt-4 api.
The part with the screenshot se... | https://stackoverflow.com/questions/79263347/openai-api-how-can-i-answer-a-question-with-an-uploaded-pdf | python, openai-api, chatgpt-api | 1,733,691,768 |
se_75921752 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI stream response in java | OpenAI stream response in java
The OpenAI chat/completions API supports a stream response by passing stream=true. This enables the response to come in chunks of data rather than one full response. It will be similar to how ChatGPT outputs answers.
I see similar question for different languages or tech stack (like here... | https://stackoverflow.com/questions/75921752/openai-stream-response-in-java | java, kotlin, okhttp, openai-api | 1,680,539,566 |
se_79262136 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why Api of New account on OpenAI not Working? | Why Api of New account on OpenAI not Working?
I created new account on Open AI and it shows free $5 limit and using it for testing but it is respponding with 429 status error do I have to pay first to test or is it error from my code?
import OpenAI from "openai";
import dotenv from "dotenv";
import { Router } from "ex... | https://stackoverflow.com/questions/79262136/why-api-of-new-account-on-openai-not-working | node.js, express, openai-api | 1,733,649,185 |
se_79232298 | stackoverflow | ARTIFICIAL_INTELLIGENCE | RateLimitError for OpenAI API key despite not having used it | RateLimitError for OpenAI API key despite not having used it
I'm trying to make a chatbot using the OpenAI API Key. Here's the code:
import openai
openai.api_key = "[key]"
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant... | https://stackoverflow.com/questions/79232298/ratelimiterror-for-openai-api-key-despite-not-having-used-it | python, chatbot, openai-api, rate-limiting | 1,732,755,242 |
se_79257336 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Docker container with OpenAI Python client fails with SSL certificate error: FileNotFoundError: [Errno 2] No such file or directory | Docker container with OpenAI Python client fails with SSL certificate error: FileNotFoundError: [Errno 2] No such file or directory
I'm running a Python script using the OpenAI API client in a Docker container. The container suddenly started failing with an SSL certificate error after rebuilding. The same code was wor... | https://stackoverflow.com/questions/79257336/docker-container-with-openai-python-client-fails-with-ssl-certificate-error-fil | docker, openai-api | 1,733,474,372 |
se_78013937 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Autogen Studio 2 - api_key is not present in llm_config or OPENAI_API_KEY env variable for agent ** primary_assistant | Autogen Studio 2 - api_key is not present in llm_config or OPENAI_API_KEY env variable for agent ** primary_assistant
Running autogen studio 2, I have my model setup and tested successful - when I run the travel demo I get the following error:
api_key is not present in llm_config or OPENAI_API_KEY env variable for ag... | https://stackoverflow.com/questions/78013937/autogen-studio-2-api-key-is-not-present-in-llm-config-or-openai-api-key-env-va | python, openai-api, ms-autogen | 1,708,209,026 |
se_79235855 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to show images from a md file in a chatbot of OpenAI | How to show images from a md file in a chatbot of OpenAI
Versión en inglés:
I'm developing a chatbot using React and TypeScript, along with the OpenAI API. I'm also working with Chroma as the database. I want to integrate it with images referenced in Markdown documents. My idea is to include image references in the do... | https://stackoverflow.com/questions/79235855/how-to-show-images-from-a-md-file-in-a-chatbot-of-openai | reactjs, typescript, chatbot, openai-api, chromadb | 1,732,855,138 |
se_76553851 | stackoverflow | ARTIFICIAL_INTELLIGENCE | extract json from a long text (gpt answer) according to a json-schema? | extract json from a long text (gpt answer) according to a json-schema?
There is some text contains a json result like (this line may change):
{
"foo":{ "bar" : ["1"] }
}
when i got the text,
i need to extract the json from text, and make sure the json is exactly the format i instruct gpt to return in prompt via exa... | https://stackoverflow.com/questions/76553851/extract-json-from-a-long-text-gpt-answer-according-to-a-json-schema | java, json, jsonschema, openai-api | 1,687,758,855 |
se_77815953 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Autogen connecting to config file errors | Autogen connecting to config file errors
Errors connecting to config files for models using autogen, seems to be dependent on the python code I am executing.
My goal is to have one config file that will work for any autogen project.
I'm able to get execute a basic conversation between assistant and user_proxy a but ad... | https://stackoverflow.com/questions/77815953/autogen-connecting-to-config-file-errors | python, configuration, artificial-intelligence, openai-api, ms-autogen | 1,705,251,996 |
se_77848486 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Autogen and Api | Autogen and Api
I am fairly new to programming and need some guidance. Hoping to find some help here. I have an Autogen Group chat I am trying to connect to a react frontend via FastAPI and Websockets. I can get it to work and return the responses to the front end with just a User_proxy and one assistant. Like so:
aut... | https://stackoverflow.com/questions/77848486/autogen-and-api | python, websocket, fastapi, openai-api, ms-autogen | 1,705,693,564 |
se_77422921 | stackoverflow | ARTIFICIAL_INTELLIGENCE | autogen throws errors in the output | autogen throws errors in the output
Unfortunately, I somehow volunteered for the university to deal with autogen. I also understand the sample codes well and now wanted to develop my own CoLab book Autotgen environment. However, when recreating the examples, I always get thousands of error messages in the output.
Can ... | https://stackoverflow.com/questions/77422921/autogen-throws-errors-in-the-output | python, artificial-intelligence, openai-api, ms-autogen | 1,699,115,632 |
se_78025327 | stackoverflow | ARTIFICIAL_INTELLIGENCE | getting error while importing agents, task, process and crew from crewai | getting error while importing agents, task, process and crew from crewai
i am getting error , while importing agents, task, process and crew from crewai
error i am getting - "TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' "
"
code - from crewai import agents , process , crew, Task
error - TypeErro... | https://stackoverflow.com/questions/78025327/getting-error-while-importing-agents-task-process-and-crew-from-crewai | python, artificial-intelligence, openai-api, google-generativeai, ms-autogen | 1,708,412,634 |
se_78649446 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AutoGen GroupChat error code (openai.BadRequestError: Error code: 400) | AutoGen GroupChat error code (openai.BadRequestError: Error code: 400)
I'm pretty new to using AutoGen so I don't know for sure if this is a simple problem to fix but I created two simple agents with the user_proxy to communicate with each other through the "GroupChat" function. However, after the first response from ... | https://stackoverflow.com/questions/78649446/autogen-groupchat-error-code-openai-badrequesterror-error-code-400 | python, artificial-intelligence, openai-api, chatgpt-api, ms-autogen | 1,718,914,855 |
se_79165226 | stackoverflow | ARTIFICIAL_INTELLIGENCE | "openai.BadRequestError: Invalid role" error while using Ollama + LiteLLM + Autogen | "openai.BadRequestError: Invalid role" error while using Ollama + LiteLLM + Autogen
Introduction
I am running an ollama server with LiteLLM proxy. I aim to design a group chat using Autogen. The designated agents are:
User_Proxy: ask question
SQL_Generator: generate SQL
SQL_Runner: run SQL (tool calling)
Re... | https://stackoverflow.com/questions/79165226/openai-badrequesterror-invalid-role-error-while-using-ollama-litellm-auto | artificial-intelligence, openai-api, ollama, ms-autogen | 1,730,960,514 |
se_79253601 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to use tools with LLMs? | How to use tools with LLMs?
I am using the stream interface of completions, e.g.
const completion = await client.chat.completions.create({
messages,
model: '...',
stream: true,
stream_options: {
include_usage: true,
},
tool_choice: {
type: 'function',
function: {
name: 'searchWeb',
}... | https://stackoverflow.com/questions/79253601/how-to-use-tools-with-llms | typescript, openai-api, large-language-model | 1,733,380,182 |
se_79250225 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LangChain `LLMChain` works fine but when using the `|` operator with `ChatOpenAI` and `ChatPromptTemplate` throws a `ValueError` | LangChain `LLMChain` works fine but when using the `|` operator with `ChatOpenAI` and `ChatPromptTemplate` throws a `ValueError`
I am working on a chatbot using LangChain with OpenAI's gpt-3.5-turbo model. When I use the LLMChain method to combine my ChatOpenAI instance, ChatPromptTemplate, and StrOutputParser, everyt... | https://stackoverflow.com/questions/79250225/langchain-llmchain-works-fine-but-when-using-the-operator-with-chatopenai | python, chatbot, openai-api, langchain | 1,733,297,857 |
se_79248144 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI - getting a failed to open stream error on ChatGPT api calls | OpenAI - getting a failed to open stream error on ChatGPT api calls
I have a small script that updates a database table with descriptions generated by ChatGPT.
It worked perfectly for a while, but the started throwing: PHP Warning: file_get_contents(https://api.openai.com/v1/chat/completions): failed to open stream:... | https://stackoverflow.com/questions/79248144/openai-getting-a-failed-to-open-stream-error-on-chatgpt-api-calls | openai-api | 1,733,238,525 |
se_77444332 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI Python Package Error: 'ChatCompletion' object is not subscriptable | OpenAI Python Package Error: 'ChatCompletion' object is not subscriptable
After updating my OpenAI package to version 1.1.1, I got this error when trying to read the ChatGPT API response:
'ChatCompletion' object is not subscriptable
Here is my code:
messages = [
{"role": "system", "content": '''You a... | https://stackoverflow.com/questions/77444332/openai-python-package-error-chatcompletion-object-is-not-subscriptable | python, typeerror, openai-api, chatgpt-api | 1,699,436,153 |
se_79237699 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Is there a direct way to define the request and translate the response in a certain language? | Is there a direct way to define the request and translate the response in a certain language?
I'm creating a chatbot using OpenAI and AISearch. Below is the request code. Now I wanted to translate my request and received a translated response based from a certain language.Aside using Language translator service. Is th... | https://stackoverflow.com/questions/79237699/is-there-a-direct-way-to-define-the-request-and-translate-the-response-in-a-cert | openai-api, azure-language-understanding, azure-openai, azure-ai-search, azure-ai-translator | 1,732,896,142 |
se_76561073 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ConversationalRetrievalChain vs LLMChain | ConversationalRetrievalChain vs LLMChain
I developed a script that worked just fine, as follows:
def get_response_from_query(db, query, k=4):
docs = db.similarity_search(query, k=k)
docs_page_content = " ".join([d.page_content for d in docs])
chat = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0.2)... | https://stackoverflow.com/questions/76561073/conversationalretrievalchain-vs-llmchain | python, artificial-intelligence, openai-api, langchain | 1,687,828,851 |
se_78511201 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Analyze pdf file with openai API | Analyze pdf file with openai API
I'm trying to upload a PDF file with chatPGT API and ask it if the file contain a specific word but It seems to not see that a gave it a file.
To upload the file, I used this code
$pdfFile contains a correct path to the pdf file.
ch = curl_init(https://api.openai.com/v1/files);
curl_se... | https://stackoverflow.com/questions/78511201/analyze-pdf-file-with-openai-api | php, pdf, openai-api | 1,716,287,233 |
se_79234590 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why is there a big performance difference between those 2 simple python multithreading codes? | Why is there a big performance difference between those 2 simple python multithreading codes?
Let's consider this python code:
def process_payload(payload, url, headers):
response = requests.post(url, headers=headers, json=payload)
return response
def parallel_group2(payloads, url, headers):
with ThreadPo... | https://stackoverflow.com/questions/79234590/why-is-there-a-big-performance-difference-between-those-2-simple-python-multithr | python, multithreading, asynchronous, openai-api | 1,732,809,581 |
se_79211363 | stackoverflow | ARTIFICIAL_INTELLIGENCE | suggestions for resolving an ambiguity in a system | suggestions for resolving an ambiguity in a system
I have a huge dataset containing information about painters, divers, drivers, electricians, chefs, gardeners, and many more, including the different types of work they can do and other related conditions. Based on this data, there are corresponding prices for each typ... | https://stackoverflow.com/questions/79211363/suggestions-for-resolving-an-ambiguity-in-a-system | python, openai-api, prompt, large-language-model, ambiguity | 1,732,195,552 |
se_78647595 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to call Open AI Transcription Audio from React Native. Expo GO. Invalid file format. Supported formats | How to call Open AI Transcription Audio from React Native. Expo GO. Invalid file format. Supported formats
I have a react native app with expo go. The functionality is simple, I tap record, and then stop, and the audio file should be sent to Open AI and transcribe it to text.
However I am having difficulties as it req... | https://stackoverflow.com/questions/78647595/how-to-call-open-ai-transcription-audio-from-react-native-expo-go-invalid-file | javascript, typescript, react-native, openai-api, expo-go | 1,718,888,000 |
se_79224054 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to Handle the code_interpreter Tool in OpenAI's Assistant Client Locally? | How to Handle the code_interpreter Tool in OpenAI's Assistant Client Locally?
I am working with OpenAI's .NET client to create a custom assistant that uses tools. I referenced the example from OpenAI's GitHub repository (link), where tools like getNameOfFamilyMemberTool, file_search, and code_interpreter are defin... | https://stackoverflow.com/questions/79224054/how-to-handle-the-code-interpreter-tool-in-openais-assistant-client-locally | openai-api | 1,732,555,837 |
se_75861442 | stackoverflow | ARTIFICIAL_INTELLIGENCE | An error occurred: module 'openai' has no attribute 'ChatCompletion' | An error occurred: module 'openai' has no attribute 'ChatCompletion'
I'm trying to build a discord bot that uses the GPT-4 API to function as a chatbot on discord. I have the most recent version of the OpenAI library but when I run my code it tells me "An error occurred: module 'openai' has no attribut... | https://stackoverflow.com/questions/75861442/an-error-occurred-module-openai-has-no-attribute-chatcompletion | python, openai-api, gpt-4 | 1,679,963,637 |
se_78367740 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to use OpenAI Assistants with Openrouter | How to use OpenAI Assistants with Openrouter
I recently came across a platform called apiepie.ai that offers GPT-4 access through something called openrouter. I would like to know if someone has used assistants with this option like with this code, because in the documentation there's only the basic send message code ... | https://stackoverflow.com/questions/78367740/how-to-use-openai-assistants-with-openrouter | javascript, artificial-intelligence, openai-api, openrouteservice, apipie | 1,713,804,296 |
se_78587595 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to add context to Vercel AI SDK's useChat without exposing it to the user | How to add context to Vercel AI SDK's useChat without exposing it to the user
At the beginning of the chat, I want to give a large text that will give the context to the ChatGPT session on what he needs to know to efficiently answer the user's prompts.
I tried using append() to add some context, but it shows the m... | https://stackoverflow.com/questions/78587595/how-to-add-context-to-vercel-ai-sdks-usechat-without-exposing-it-to-the-user | next.js, vercel, openai-api, vercel-ai | 1,717,687,016 |
se_79213744 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Failed to load resource: the server responded with a status of 401 () api.copilotkit.ai/copilotkit/v1:1 | Failed to load resource: the server responded with a status of 401 () api.copilotkit.ai/copilotkit/v1:1
i am trying to add a copilot ai chatbot which can add tasks and on asking it to add a task, the following console message is showing.
I have used copilot AI documentation for integrating the copilot chatbot
My proje... | https://stackoverflow.com/questions/79213744/failed-to-load-resource-the-server-responded-with-a-status-of-401-api-copilo | javascript, reactjs, node.js, openai-api | 1,732,252,527 |
se_75837803 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Streaming ChatGPT's results with Flask and LangChain | Streaming ChatGPT's results with Flask and LangChain
Basically I want to achieve this with Flask and LangChain: https://www.youtube.com/watch?v=x8uwwLNxqis.
I'm building a Q&A Flask app that uses LangChain in the backend, but I'm having trouble to stream the response from ChatGPT. My chain looks like this:
chain =... | https://stackoverflow.com/questions/75837803/streaming-chatgpts-results-with-flask-and-langchain | python, flask, openai-api, langchain, large-language-model | 1,679,688,838 |
se_79039544 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API error: "Invalid parameter: 'response_format' of type 'json_schema' is not supported with model version `gpt-4-turbo`" | OpenAI API error: "Invalid parameter: 'response_format' of type 'json_schema' is not supported with model version `gpt-4-turbo`"
From the main page and official documentation, OpenAI clearly mentioned we can use the response_format as follows:
What I'm trying in Postman is the following:
{
... | https://stackoverflow.com/questions/79039544/openai-api-error-invalid-parameter-response-format-of-type-json-schema-is | json, openai-api, large-language-model, gpt-4, openai-assistants-api | 1,727,702,419 |
se_75891013 | stackoverflow | ARTIFICIAL_INTELLIGENCE | API Call failing to respond | API Call failing to respond
I am trying to call the chat gpt api (image generation) using the ASYNC Http client> in Android studio I am trying to generate an image based on text input. However i still get a failure whenever i try to call the api. I am still unsure how to go about this and help would be appreciated.
f... | https://stackoverflow.com/questions/75891013/api-call-failing-to-respond | android, kotlin, openai-api, image-generation | 1,680,195,384 |
se_78492188 | stackoverflow | ARTIFICIAL_INTELLIGENCE | chat boot chatgpt api in kotlin android app : Unexpected response code: 404 | chat boot chatgpt api in kotlin android app : Unexpected response code: 404
i want to add chat boot chat gpt api in simple activity , the problem is Failed to get a response
and in logcat (Unexpected response code: 404) , im my activity (text view to show response and edit text and btn to call the function).
my functi... | https://stackoverflow.com/questions/78492188/chat-boot-chatgpt-api-in-kotlin-android-app-unexpected-response-code-404 | android, kotlin, openai-api | 1,715,889,067 |
se_76519270 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Error converting response to stream in Vercel AI SDK | Error converting response to stream in Vercel AI SDK
I'm trying to build a really simple chatbot with vercel ai. I'm using this tutorial: https://www.youtube.com/watch?v=VsyIya5PWb0 (github source code: https://github.com/GuiBibeau/exploring-vercel-ai)
I think the issue is in the route.ts or page.tsx, but I'm not comp... | https://stackoverflow.com/questions/76519270/error-converting-response-to-stream-in-vercel-ai-sdk | typescript, artificial-intelligence, vercel, openai-api | 1,687,309,038 |
se_79205272 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to get real-time data such as news, weather, etc. from the OpenAI model? | How to get real-time data such as news, weather, etc. from the OpenAI model?
I wrote a prompt that gives me a daily update on local news, global news, weather, etc. Works really well in ChatGPT Plus when using the gpt-4o model.
Now, I wanted to automate it using the OpenAI API with the gpt-4o model. What it came back ... | https://stackoverflow.com/questions/79205272/how-to-get-real-time-data-such-as-news-weather-etc-from-the-openai-model | openai-api, gpt-4 | 1,732,056,425 |
se_79203588 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Python Pydantic Module not found in Docker Container (Raspberry Pi) | Python Pydantic Module not found in Docker Container (Raspberry Pi)
I'm trying to transfer a Flask web app to a Raspberry Pi 4b using Docker. The container runs flawlessly on AMD architecture. The ARM architecture is to be tested on the Raspberry. The creation of the image based on python3.12-bookworm and the containe... | https://stackoverflow.com/questions/79203588/python-pydantic-module-not-found-in-docker-container-raspberry-pi | docker, flask, openai-api, raspberry-pi4 | 1,732,022,638 |
se_78848020 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Invalid content type. image_url is only supported by certain models | Invalid content type. image_url is only supported by certain models
That's my Python request:
def analyze_screenshot_base64(encoded_image):
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {openai.api_key}"
}
payload = {
"model": "gpt-4o-mini",
"mes... | https://stackoverflow.com/questions/78848020/invalid-content-type-image-url-is-only-supported-by-certain-models | python, openai-api, chatgpt-api | 1,723,114,834 |
se_76908845 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Mocking OpenAI Chat Client | Mocking OpenAI Chat Client
How can the OpenAIClient be mocked using MOQ to return a Completions response? I have a json response and would like to deserialize that to Response<Completions>.
private OpenAIClient client = // initialize;
private async Task<Response<Completions>> Complete(string model, st... | https://stackoverflow.com/questions/76908845/mocking-openai-chat-client | c#, .net, unit-testing, moq, openai-api | 1,692,130,105 |
se_78099887 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API error: "TypeError: Configuration is not a constructor" | OpenAI API error: "TypeError: Configuration is not a constructor"
I am using Node.js with Express.js, and I would like to generate images by taking text from the user. For the moment, I am using the OpenAI API as follows:
require("dotenv").config();
const express = require("express");
const bodyParser = requ... | https://stackoverflow.com/questions/78099887/openai-api-error-typeerror-configuration-is-not-a-constructor | node.js, openai-api | 1,709,541,348 |
se_75413847 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do ask ChatGPT with API from Excel macros (vba)? | How do ask ChatGPT with API from Excel macros (vba)?
I'd like to use excel to ask ChatGPT questions and get them back in a other cell.
I have an API which is given in cell "A1".
The question should be taken out of "A3" - the answer should be in "A6":
Sub SendQuestionToGPT3()
'Declare variables
Dim request As ... | https://stackoverflow.com/questions/75413847/how-do-ask-chatgpt-with-api-from-excel-macros-vba | excel, vba, xmlhttprequest, openai-api | 1,676,047,238 |
se_79196245 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I format an OpenAI API request in Swift? | How do I format an OpenAI API request in Swift?
I need to use the OpenAI API and am struggling to format the request. I started by referencing the curl code that is listed in the OpenAI API playground, and this code worked in my terminal. That request is here:
curl https://api.openai.com/v1/chat/completions \
-H "Co... | https://stackoverflow.com/questions/79196245/how-do-i-format-an-openai-api-request-in-swift | swift, openai-api | 1,731,799,919 |
se_76358308 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Get ReadStream from Firebase Storage and pass into Openai API | Get ReadStream from Firebase Storage and pass into Openai API
I am trying to download an image from firebase storage and pass it into an openai endpoint
currently, my code looks like this
const fileStorage = await getStorageAdmin(uid, "/sample.png");
const file = fileStorage.createReadStream();
const maskStorage ... | https://stackoverflow.com/questions/76358308/get-readstream-from-firebase-storage-and-pass-into-openai-api | javascript, next.js, firebase-storage, firebase-admin, openai-api | 1,685,371,793 |
se_76348006 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to write a GPT prompt programmatically? | How to write a GPT prompt programmatically?
I have a template prompt similar to this one:
prompt = f"""
Write a poem about the topic delimited by triple backticks if it starts with a consonant,
otherwise say
"foo".
Topic: ```{topic}```
"""
and a list of topics:
topics = ['cuddly pandas', 'ugly bears', 'sketchy Elo... | https://stackoverflow.com/questions/76348006/how-to-write-a-gpt-prompt-programmatically | prompt, openai-api, f-string, chatgpt-api | 1,685,206,889 |
se_76846895 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I use cheerio web scraper as an agent tool in Flowise? | How can I use cheerio web scraper as an agent tool in Flowise?
I am developing a small project on Flowise and I need to use Cheerio web scraper as a tool for agent. How can I do this? Or is there any way or tool to do in python langchain app when I give the website url, it scraps and give me the all text? | https://stackoverflow.com/questions/76846895/how-can-i-use-cheerio-web-scraper-as-an-agent-tool-in-flowise | openai-api, langchain | 1,691,340,799 |
se_79160811 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Python: Compare html tags in RO folder with their corresponding tags in EN folder and displays in Output the unique tags from both files | Python: Compare html tags in RO folder with their corresponding tags in EN folder and displays in Output the unique tags from both files
In short, I have two files, one in Romanian, the other has been translated into English. In the RO file there are some tags that have not been translated into EN. So I want to displa... | https://stackoverflow.com/questions/79160811/python-compare-html-tags-in-ro-folder-with-their-corresponding-tags-in-en-folde | python, python-3.x, openai-api, claude | 1,730,844,119 |
se_79173506 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ChatGPT Vision - calculate tokens | ChatGPT Vision - calculate tokens
According to the official documentation, for analyzing a 225x224 image, no more than 800 tokens are obtained. but in fact about 8000 tokens come out.
model: gpt-4o-mini-2024-07-18
code:
base64_image = encode_image(image_path)
response = self.client.chat.completions.create(
model=s... | https://stackoverflow.com/questions/79173506/chatgpt-vision-calculate-tokens | python, openai-api, chatgpt-api | 1,731,179,104 |
se_79181784 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to optimize the prompt and make it a single prompt to reduce the api request | How to optimize the prompt and make it a single prompt to reduce the api request
I am using a multiple prompts to fetch the answer from the openai gpt 4 model. How can I optimize it to make it a single APi request instead of hitting the API multiple times
static async Task ProcessAndStorePrompts(IConfiguration configu... | https://stackoverflow.com/questions/79181784/how-to-optimize-the-prompt-and-make-it-a-single-prompt-to-reduce-the-api-request | c#, artificial-intelligence, openai-api, gpt-4 | 1,731,425,638 |
se_79180785 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to create a continous conversation between two OpenAI chatbots | How to create a continous conversation between two OpenAI chatbots
I want two independent instances of OpenAI chatbots to play a wordgame via python API. At this moment I only know how to create a single instance and ask it a single set of user messages. I thus have two main considerations:
how can I have an ongoing ... | https://stackoverflow.com/questions/79180785/how-to-create-a-continous-conversation-between-two-openai-chatbots | python, openai-api | 1,731,408,695 |
se_78011376 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Insert chat into ConversationBufferMemory | Insert chat into ConversationBufferMemory
I have a mongoDB that stores user chat history using their session ID.
I need to pass this history to ConversationRetrievalChain, using the ConversationBufferMemory.
How can I transform/ insert the history into a new ConversationBufferMemory? | https://stackoverflow.com/questions/78011376/insert-chat-into-conversationbuffermemory | python, mongodb, openai-api, langchain | 1,708,157,106 |
se_78817346 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to resolve the crewai error: Input should be a valid dictionary or instance of BaseAgent? | How to resolve the crewai error: Input should be a valid dictionary or instance of BaseAgent?
I am using crewai to set up 3 agents with one as manager agent and 2 worker agents. This works perfectly fine when I use a sequential process but when I switch to hierarchical processing, I see the following error
manager_age... | https://stackoverflow.com/questions/78817346/how-to-resolve-the-crewai-error-input-should-be-a-valid-dictionary-or-instance | python, openai-api, crewai | 1,722,441,834 |
se_76423396 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ChatGPT OpenAI API doesn't understand prompt | ChatGPT OpenAI API doesn't understand prompt
So i want to translate a specific prompt from for instance English to Netherlands and give 3 different options for this, sometimes it seems to work and sometimes ChatGPT gives text after the text he should translate. Because he doesn’t understand the prompt all the time... | https://stackoverflow.com/questions/76423396/chatgpt-openai-api-doesnt-understand-prompt | c#, translation, openai-api | 1,686,141,421 |
se_79175469 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Is there a good way to avoid Spring AI responses that use a Vector Store to stop talking about Context? | Is there a good way to avoid Spring AI responses that use a Vector Store to stop talking about Context?
I am noticing that when I add a vector store I am constantly getting responses like
"Sadly, it seems the context doesn't have any secret blueprints or insider gossip about your specific Z-Wave network."
I get why ... | https://stackoverflow.com/questions/79175469/is-there-a-good-way-to-avoid-spring-ai-responses-that-use-a-vector-store-to-stop | openai-api, spring-ai | 1,731,263,075 |
se_76917548 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API error: "OpenAIApi is not a constructor" | OpenAI API error: "OpenAIApi is not a constructor"
I want to integrate the ChatGPT API (i.e., GPT-3.5 API) into my application. I tried many ways, but I did not find a solution to my error.
My code:
require("dotenv").config();
const { Configuration, OpenAIApi } = require("openai");
const readline = require... | https://stackoverflow.com/questions/76917548/openai-api-error-openaiapi-is-not-a-constructor | node.js, openai-api, chatgpt-api | 1,692,226,886 |
se_78294553 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI pip error while installing (Rust manager issue?) | OpenAI pip error while installing (Rust manager issue?)
I just tried to intall openai on my pip venv, and I got this error.
My pip is up to date and I tried on 2 different environments.
My command that i entered was:
pip install openai
I wanted to install openai api using pip and got an unusual error back.
Error Messa... | https://stackoverflow.com/questions/78294553/openai-pip-error-while-installing-rust-manager-issue | python, pip, openai-api, python-install | 1,712,601,929 |
se_76085064 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langchain gpt-3.5-turbo models reads files - problem | 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 langchain.embeddings.openai import OpenAI... | https://stackoverflow.com/questions/76085064/langchain-gpt-3-5-turbo-models-reads-files-problem | python, openai-api, langchain | 1,682,255,809 |
se_79149341 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to store streaming messages from openai to chat history database? | How to store streaming messages from openai to chat history database?
I have a RAG chatbot where the frontend and backend are running on different ports.
We use a REST API to communicate between them,
the issue is, I am trying to store the "user" message and "ai" reply into a chat history database.
When the user sends... | https://stackoverflow.com/questions/79149341/how-to-store-streaming-messages-from-openai-to-chat-history-database | python, asynchronous, streaming, openai-api, langchain | 1,730,492,849 |
se_75440754 | stackoverflow | ARTIFICIAL_INTELLIGENCE | "TypeError: expected str, bytes or os.PathLike object, not NoneType" after using Streamlit file_uploader | "TypeError: expected str, bytes or os.PathLike object, not NoneType" after using Streamlit file_uploader
I am trying to use streamlit and gpt index to create some kind of a dummy test website. I keep getting the same error.
from gpt_index import GPTListIndex, readers, GPTSimpleVectorIndex, LLMPredictor, Prom... | https://stackoverflow.com/questions/75440754/typeerror-expected-str-bytes-or-os-pathlike-object-not-nonetype-after-using | python, python-3.x, streamlit, openai-api | 1,676,319,259 |
se_78475340 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I create an action for my own GPT app that can be append additional text to users' questions | How can I create an action for my own GPT app that can be append additional text to users' questions
I have created my own custom GPT using the "My GPTs" platform on GPT4. Now I want to add a new action to this app, via My GPTs -> choose my custom GPT -> Configure -> Actions -> Create new actions
This action shoul... | https://stackoverflow.com/questions/78475340/how-can-i-create-an-action-for-my-own-gpt-app-that-can-be-append-additional-text | action, openai-api, chatgpt-api, gpt-4 | 1,715,649,579 |
se_79078081 | stackoverflow | ARTIFICIAL_INTELLIGENCE | is it possible to change Response JSON schema Format to OpenAI Assistant during session? | is it possible to change Response JSON schema Format to OpenAI Assistant during session?
I'm trying to start OpenAI Assistant with Python, and don't understand how to use it correctly:
Basically, I want to ask several questions in a single run (I hope that some data remains in the context window), but with a different... | https://stackoverflow.com/questions/79078081/is-it-possible-to-change-response-json-schema-format-to-openai-assistant-during | python, openai-api | 1,728,647,063 |
se_77751049 | stackoverflow | ARTIFICIAL_INTELLIGENCE | openai.Moderation not working (openai version issue) | openai.Moderation not working (openai version issue)
As I'm trying to test my chatbot based on OpenAI API, I'm getting the following error on the Terminal :
'You tried to access openai.Moderation, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python
for the API.
... | https://stackoverflow.com/questions/77751049/openai-moderation-not-working-openai-version-issue | python, chatbot, openai-api | 1,704,276,019 |
se_78437749 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Error 404 while calling customised assistant with ChatGPT API in R | Error 404 while calling customised assistant with ChatGPT API in R
To analyse sentences, I've trained a ChatGPT assistant that I'm calling from an R function to classify sentences:
library(openai)
Sys.setenv(
OPENAI_API_KEY = 'XXXXXXXXXXXXXXXXXX'
)
score_sentence_CSM <- function(mySentence) {
myScore <- creat... | https://stackoverflow.com/questions/78437749/error-404-while-calling-customised-assistant-with-chatgpt-api-in-r | r, nlp, openai-api, chatgpt-api, assistant | 1,715,010,482 |
se_78537177 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I add debugging statements inside a plugin that I am making for TaskWeaver? | How do I add debugging statements inside a plugin that I am making for TaskWeaver?
I am playing around with TaskWeaver and I want to develop a plugin in it. I want to be able to add debug statements. However, since the plugin code is run by the code interpreter and now directly through my terminal, simply adding print... | https://stackoverflow.com/questions/78537177/how-do-i-add-debugging-statements-inside-a-plugin-that-i-am-making-for-taskweave | openai-api, large-language-model | 1,716,784,005 |
se_79129711 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to call ChatGPT Assistants API v2 from Semantic Kernel in C# | How to call ChatGPT Assistants API v2 from Semantic Kernel in C#
I'd like to call a ChatGPT assistant I've created in Semantic Kernel.
I'd prefer to call the ChatGPT API directly rather than Azure but either will do.
I want to use an assistant not just call ChatGPT 4o because I want it to know about documents I uploa... | https://stackoverflow.com/questions/79129711/how-to-call-chatgpt-assistants-api-v2-from-semantic-kernel-in-c | openai-api, semantic-kernel, openai-assistants-api | 1,729,989,520 |
se_79149500 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why does OpenAI GPT always return the same response when I ask for "random" outputs? | Why does OpenAI GPT always return the same response when I ask for "random" outputs?
I'm using the gpt-4o-mini model for random outputs, but it keeps giving me the same results for similar prompts. For example, if I ask it for a "random number from 1 to 10," it almost always responds with 7. If I adjust the ... | https://stackoverflow.com/questions/79149500/why-does-openai-gpt-always-return-the-same-response-when-i-ask-for-random-outp | javascript, random, openai-api, gpt-4o-mini | 1,730,497,863 |
se_79149449 | stackoverflow | ARTIFICIAL_INTELLIGENCE | "OpenAI Python API Key Error: 'The api_key client option must be set' | "OpenAI Python API Key Error: 'The api_key client option must be set'
I'm trying to use the OpenAI API in Python to create a chat completion, but I keep running into an error related to the API key. Here's my code:
import os
from openai import OpenAI
client = OpenAI(
# This is the default and can be ... | https://stackoverflow.com/questions/79149449/openai-python-api-key-error-the-api-key-client-option-must-be-set | python, environment-variables, operating-system, openai-api | 1,730,495,928 |
se_79146931 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Debounce InlineCompletionProvider results in Monaco Editor | Debounce InlineCompletionProvider results in Monaco Editor
Using monaco-editor, I'm trying to implement Copilot-like features on top and providing OpenAI suggestions back to users. For that, I wrote and registered a custom monaco.languages.InlineCompletionsProvider
monaco.languages.registerInlineCompletionsProvider(
... | https://stackoverflow.com/questions/79146931/debounce-inlinecompletionprovider-results-in-monaco-editor | openai-api, monaco-editor, github-copilot, visual-studio-monaco | 1,730,435,005 |
se_75329512 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Getting ReferenceError: openai is not defined, using puppeteer when making an API call to OpenAI | Getting ReferenceError: openai is not defined, using puppeteer when making an API call to OpenAI
Full Error: ReferenceError: openai is not defined
Issue calling openai API within puppeteer method 'evaluate'.
I'm having trouble identifying the error as to why the variable 'openai' is undefined at within the local scope... | https://stackoverflow.com/questions/75329512/getting-referenceerror-openai-is-not-defined-using-puppeteer-when-making-an-ap | javascript, typescript, web-scraping, puppeteer, openai-api | 1,675,376,231 |
se_75879812 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Using a single API key or generating temporary keys for each user? | Using a single API key or generating temporary keys for each user?
I'm building a Flutter app that requires the OpenAI GPT3 API, and I'm not sure how to implement it. Currently, I'm using a single API key that's stored in a .env file and accessed via the flutter_dotenv package. I'm wondering whether it's best to use t... | https://stackoverflow.com/questions/75879812/using-a-single-api-key-or-generating-temporary-keys-for-each-user | flutter, openai-api, api-key | 1,680,107,030 |
se_79118646 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI Assistant - working for one API_Key but not for another one? | OpenAI Assistant - working for one API_Key but not for another one?
i have the following simple assistant using the gpt-4o model -
import os
import sys
from dotenv import load_dotenv
from openai import OpenAI
path = os.path.abspath(os.path.dirname(sys.argv[0]))
fn = os.path.join(path, ".env")
load_dotenv(fn)
CHATGPT... | https://stackoverflow.com/questions/79118646/openai-assistant-working-for-one-api-key-but-not-for-another-one | python, openai-api | 1,729,697,556 |
se_77756933 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I use telegram voice message in aiogram to transcribe in Whisper? | How can I use telegram voice message in aiogram to transcribe in Whisper?
How can I use voice message that user sent without saving in disk to transcribe it via OpenAI’s whisper in aiogram? I tried to save file in io.BytesIO() object, but I don’t know will this stay permanently in memory or will be deleted through som... | https://stackoverflow.com/questions/77756933/how-can-i-use-telegram-voice-message-in-aiogram-to-transcribe-in-whisper | python, telegram, openai-api, aiogram | 1,704,358,178 |
se_79129265 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Using `with_structured_output` with ChatOpenAI wrapped in a LLMChain raises a validation error | Using `with_structured_output` with ChatOpenAI wrapped in a LLMChain raises a validation error
The following code raises an error because the LLMChain tries to return a dictionary with two keys:
{ "page": "xxxx", "text": Card(name='Alice and Bob', description='An example card') }
but it fails to do so because the Card... | https://stackoverflow.com/questions/79129265/using-with-structured-output-with-chatopenai-wrapped-in-a-llmchain-raises-a-va | openai-api, pydantic, langchain | 1,729,968,890 |
se_78648540 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Streaming chat response in flatlist | Streaming chat response in flatlist
I'm building a mobile app with an integrated chat that uses OpenAI API or llama3 as model. i managed to get the streaming working properly. However I have a small problem when display the message being streamed. currently the message is displayed once the streaming is done instead o... | https://stackoverflow.com/questions/78648540/streaming-chat-response-in-flatlist | react-native, expo, openai-api, large-language-model, chatgpt-api | 1,718,898,955 |
se_79114042 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API throws Bad Request when uploading a file | OpenAI API throws Bad Request when uploading a file
I am using the Python version of the OpenAI API and trying to upload a file with the following code:
client.files.create(file=myFile, purpose="fine-tune")
The client has been initialized with a valid API key, and other calls to the API (to send text prompts) work cor... | https://stackoverflow.com/questions/79114042/openai-api-throws-bad-request-when-uploading-a-file | python, openai-api | 1,729,599,838 |
se_75783524 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Train gpt-3 on email conversations | Train gpt-3 on email conversations
I have to train gpt-3 on email data, so that the support team can get a quick answer from a chat-bot, for questions that were asked before by customers. There are email conversations between customers and the support team (Customer1 ask question, Support answers, Customer1 asks anoth... | https://stackoverflow.com/questions/75783524/train-gpt-3-on-email-conversations | machine-learning, openai-api, gpt-3 | 1,679,244,247 |
se_75857188 | stackoverflow | ARTIFICIAL_INTELLIGENCE | sending audio file to open ai whisper model | 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 Request\nbody -> file\n field r... | https://stackoverflow.com/questions/75857188/sending-audio-file-to-open-ai-whisper-model | javascript, blob, filereader, openai-api, openai-whisper | 1,679,928,497 |
se_76681507 | stackoverflow | ARTIFICIAL_INTELLIGENCE | langchain Rate limit error with introduction | langchain Rate limit error with introduction
I'm currently trying langchain, and after the first basic tutorial (this following code), i have a RateLimitError.
from langchain.llms import OpenAI
llm = OpenAI(temperature=0.9)
llm.predict("What would be a good company name for a company that makes colorful socks?")
Her... | https://stackoverflow.com/questions/76681507/langchain-rate-limit-error-with-introduction | openai-api, langchain, py-langchain | 1,689,265,361 |
se_79122892 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Check when vectors are uploaded to Pinecone namespace | Check when vectors are uploaded to Pinecone namespace
I have a pinecone index set up and I am using Langchain to upload my prepared Documents to a certain namespace.
My problem is that, I am returning the PineconeVectorStore and passing that as a parameter to another class; however, Pinecone takes a few seconds to com... | https://stackoverflow.com/questions/79122892/check-when-vectors-are-uploaded-to-pinecone-namespace | python, openai-api, langchain, pinecone | 1,729,787,610 |
se_79119486 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ChatGPT API Issue or jQuery - Not Retrieving Full Response | ChatGPT API Issue or jQuery - Not Retrieving Full Response
I have some javascript that is analysing content, it generates a content analysis of content initially, and then adds a button to "write content" about the content analysis.
My problem is the first section to analyse works, but it only generates the first 50 w... | https://stackoverflow.com/questions/79119486/chatgpt-api-issue-or-jquery-not-retrieving-full-response | javascript, openai-api, chatgpt-api | 1,729,712,385 |
se_79117767 | stackoverflow | ARTIFICIAL_INTELLIGENCE | When using openai assistants v2, which models are supported? | When using openai assistants v2, which models are supported?
I have some old code running with openai assistants beta v1 using model gpt-4-1106-preview and I'm trying to follow steps in:
https://platform.openai.com/docs/assistants/migration
To upgrade to v2. It all works if I keep the model the same but when I try and... | https://stackoverflow.com/questions/79117767/when-using-openai-assistants-v2-which-models-are-supported | openai-api, openai-assistants-api | 1,729,683,906 |
se_77574489 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to access internet by Bing with OpenAi from Google Sheets? | How to access internet by Bing with OpenAi from Google Sheets?
Using GPT-4 with ChatGPT is it possible to access the web through Bing? I connected OpenAI API with Google Sheets, but the answer to my prompts was there would be no internet access possible.
Is it in general so, that OpenAI can't run Bing from Google Shee... | https://stackoverflow.com/questions/77574489/how-to-access-internet-by-bing-with-openai-from-google-sheets | google-sheets, openai-api, chatgpt-api | 1,701,291,859 |
se_79117044 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to do dependency injection with .NET OpenAI 2.1.0-beta.1? | How to do dependency injection with .NET OpenAI 2.1.0-beta.1?
Before, using Azure.AI.OpenAI 1.0.0-beta.xx, I had this in my Program.cs:
builder.Services.AddAzureClients(x => { x.AddOpenAIClient( ...
This seems to have been deprecated. At least, I cannot find out how to set up dependency injection like that.
If I wan... | https://stackoverflow.com/questions/79117044/how-to-do-dependency-injection-with-net-openai-2-1-0-beta-1 | c#, openai-api, azure-openai | 1,729,671,683 |
se_75067851 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to fix Python pip install openai error: subprocess-exited-with-error | How to fix Python pip install openai error: subprocess-exited-with-error
I'm trying to install OpenAI with Python 3.11, Windows OS, pip fully upgraded, and I got this error.
Here is the full error message:
Collecting openai
Using cached openai-0.26.0.tar.gz (54 kB)
Installing build dependencies ... done
Getting ... | https://stackoverflow.com/questions/75067851/how-to-fix-python-pip-install-openai-error-subprocess-exited-with-error | python, python-3.x, windows, openai-api, gpt-3 | 1,673,342,625 |
se_79101912 | stackoverflow | ARTIFICIAL_INTELLIGENCE | I am not able to get the desired Response from HTTP Post API using the StreamingResponse from the OpenAI Azure | I am not able to get the desired Response from HTTP Post API using the StreamingResponse from the OpenAI Azure
I am using the Azure OpenAI to generate the response based on the query I am send it using the Postman in the PostAPI with the boy like:
{"query":"what is de-iceing"}
Now, once it is running I am able to see ... | https://stackoverflow.com/questions/79101912/i-am-not-able-to-get-the-desired-response-from-http-post-api-using-the-streaming | azure, azure-functions, postman, openai-api, streamingresponsebody | 1,729,251,521 |
se_79092979 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to Use OpenAI Batch API in C# | How to Use OpenAI Batch API in C#
I want to use Batch API of openai to get the response for my data. I am not sure can we do the same thing in c# which we do in python. In Python we upload a .jsonl file on the OpenAI server. Then the server reads the file to generate the response which is then stored in a file whose i... | https://stackoverflow.com/questions/79092979/how-to-use-openai-batch-api-in-c | python, c#, openai-api | 1,729,065,031 |
se_77573978 | stackoverflow | ARTIFICIAL_INTELLIGENCE | openai.APITimeoutError: Request timed out. when trying to implement with dialogflow(ES) | openai.APITimeoutError: Request timed out. when trying to implement with dialogflow(ES)
I want to integrate opeai api with my chatbot built with Dialogflow(ES) But I Keep getting a timeout error how do I fix it?
from fastapi import FastAPI
from fastapi import Request
from fastapi.responses import JSONResponse
from ope... | https://stackoverflow.com/questions/77573978/openai-apitimeouterror-request-timed-out-when-trying-to-implement-with-dialogf | python, dialogflow-es, chatbot, openai-api | 1,701,285,596 |
se_79091722 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Unable to install `evals` python cli for OpenAI | Unable to install `evals` python cli for OpenAI
Failing to install: pip install evals. For complete logs please see this gist file here.
Tools Version:
python --version: Python 3.9.6
pip --version: pip 24.2 from /Users/apple/Library/Python/3.9/lib/python/site-packages/pip (python 3.9)
Collecting keras<2.8,>=2.7.0rc0... | https://stackoverflow.com/questions/79091722/unable-to-install-evals-python-cli-for-openai | python, python-3.x, pip, openai-api | 1,729,025,680 |
se_79007155 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Does prompt_token usage affect my billing when using Azure OpenAI models with your own data? | Does prompt_token usage affect my billing when using Azure OpenAI models with your own data?
I have set Azure OpenAI on my data, Chat with Azure OpenAI models using your own data. My goal was to reduce token usage in each request.
However, I have noticed additional prompt_token usage, even when I am sending user conte... | https://stackoverflow.com/questions/79007155/does-prompt-token-usage-affect-my-billing-when-using-azure-openai-models-with-yo | openai-api, chatgpt-api, azure-openai, azure-ai | 1,726,841,890 |
se_77218224 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Using Whisper API to Generate .SRT Transcripts? | Using Whisper API to Generate .SRT Transcripts?
I'm exploring the capabilities of the Whisper API and was wondering if it can be used to generate an .SRT file with transcriptions. From what I understand, this transcription to .SRT can be achieved when running the model locally using the Whisper package. Unfortunately,... | https://stackoverflow.com/questions/77218224/using-whisper-api-to-generate-srt-transcripts | openai-api, openai-whisper | 1,696,276,968 |
se_78779006 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why is the consumption of openai tokens in azure hybrid search 100x higher in comparison to 'regular' prompts? | Why is the consumption of openai tokens in azure hybrid search 100x higher in comparison to 'regular' prompts?
We are using openai via microsoft azure. Doing 'regular' prompts / using the api leads to the following output:
{
choices: [
{
content_filter_results: [Object],
finish_reason: 'stop'... | https://stackoverflow.com/questions/78779006/why-is-the-consumption-of-openai-tokens-in-azure-hybrid-search-100x-higher-in-co | azure, token, openai-api, azure-cognitive-search, azure-openai | 1,721,655,265 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.