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_74716059 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I create OAuth based login with Open AI api? | How can I create OAuth based login with Open AI api?
I'm trying to build an app using GPT3 APIs and would like users to login to the app using OpenAI's credentials so as to use their account for GPT3 APIs requests, however there is no support for 3rd party login so far in Open AI's documentation. Anyone has ideas on h... | https://stackoverflow.com/questions/74716059/how-can-i-create-oauth-based-login-with-open-ai-api | authentication, oauth, openai-api | 1,670,413,123 |
se_76833143 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I split csv file read in langchain | How can I split csv file read in langchain
this is set up for langchain
from langchain.text_splitter import RecursiveCharacterTextSplitter
text_splitter=RecursiveCharacterTextSplitter(chunk_size=100,
chunk_overlap=20,
length_f... | https://stackoverflow.com/questions/76833143/how-can-i-split-csv-file-read-in-langchain | python, csv, openai-api, langchain, large-language-model | 1,691,126,909 |
se_79428354 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Lambda function read audio file coming from frontend as form data | Lambda function read audio file coming from frontend as form data
I'm building a react native app that pass as form data an audio registration to a backend lambda function written in golang.
I'm using react-native-audio-recorder-player:
const audioSet: AudioSet = {
AudioEncoderAndroid: AudioEncoderAndroidType.AAC,
... | https://stackoverflow.com/questions/79428354/lambda-function-read-audio-file-coming-from-frontend-as-form-data | go, aws-lambda, openai-api | 1,739,223,185 |
se_75998988 | stackoverflow | ARTIFICIAL_INTELLIGENCE | tRPC stream API response from OpenAI to React client | tRPC stream API response from OpenAI to React client
I am currently working on a way to implement the openai-node package into my Next.js application. Because of the long generation times of OpenAI completions, I want to make use of streaming (which is normally not supported inside the package, see here). But I have a... | https://stackoverflow.com/questions/75998988/trpc-stream-api-response-from-openai-to-react-client | typescript, next.js, stream, openai-api, trpc.io | 1,681,326,414 |
se_77216275 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Failed to fetch locations error message when trying to create a new web app in azure openai studio | Failed to fetch locations error message when trying to create a new web app in azure openai studio
In azure openai studio, after creating model, I'm trying to deploy model to a new web application and getting a "Failed to fetch locations" error message, and a message which says "Request failed with status code 404"
I'... | https://stackoverflow.com/questions/77216275/failed-to-fetch-locations-error-message-when-trying-to-create-a-new-web-app-in-a | azure, web-applications, openai-api | 1,696,256,682 |
se_79426568 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Streaming WCF response | Streaming WCF response
I have a WCF web service which calls a generative model using the OpenAI C# client. I want to stream this response, as it comes in, to the WCF client. My current transfer mode is set to "Streamed" with a closeTimeout of 1 second. A simplified version of the code that the service currently runs i... | https://stackoverflow.com/questions/79426568/streaming-wcf-response | c#, wcf, streaming, openai-api | 1,739,178,650 |
se_79404571 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why am I getting "model_not_found" error when using OpenAI's o3-mini model? | Why am I getting "model_not_found" error when using OpenAI's o3-mini model?
OpenAI recently released the o3-mini model (announced around January 31, 2025). I am trying to use it via the API, but I receive the following error:
Error: Error code: 404 - {'error': {'message': 'The model o3-mini does not exis... | https://stackoverflow.com/questions/79404571/why-am-i-getting-model-not-found-error-when-using-openais-o3-mini-model | error-handling, openai-api, chatgpt-api, openaiembeddings | 1,738,394,039 |
se_77177922 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Can we control number of documents to return in RetrievalQA Langchain | Can we control number of documents to return in RetrievalQA Langchain
Can we control the document query parameter in RetrievalQA() like we could do in vectorDBQA() in langchain before? Also, shall I use map_reduce chain type instead for my large documents?
I tried to look into the source code but could not find it. | https://stackoverflow.com/questions/77177922/can-we-control-number-of-documents-to-return-in-retrievalqa-langchain | openai-api, langchain, large-language-model, nlp-question-answering, llama | 1,695,714,079 |
se_79240671 | stackoverflow | ARTIFICIAL_INTELLIGENCE | TypeError: 'NoneType' object is not subscriptable - I can't seem to solve it | TypeError: 'NoneType' object is not subscriptable - I can't seem to solve it
I am trying to create a local chatbot using LM Studio. I have the latest OpenAI Python library installed. However, when I run my app.py file, it states that:
line 25, in <module>
response = chat_with_gpt(human_input)
line 17,... | https://stackoverflow.com/questions/79240671/typeerror-nonetype-object-is-not-subscriptable-i-cant-seem-to-solve-it | python, openai-api, lm-studio | 1,733,009,951 |
se_76264205 | stackoverflow | ARTIFICIAL_INTELLIGENCE | In Langchain, why ConversationalRetrievalChain not remembering the chat history and Entering new ConversationalRetrievalChain chain for each chat? | In Langchain, why ConversationalRetrievalChain not remembering the chat history and Entering new ConversationalRetrievalChain chain for each chat?
I am trying to create an customer support system using langchain. I am using text documents as external knowledge provider via TextLoader
In order to remember the chat I us... | https://stackoverflow.com/questions/76264205/in-langchain-why-conversationalretrievalchain-not-remembering-the-chat-history | python, openai-api, langchain, large-language-model | 1,684,247,209 |
se_79317849 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AttributeError: 'str' object has no attribute 'model_dump' in langchain_core | AttributeError: 'str' object has no attribute 'model_dump' in langchain_core
I've encountered an error while working with the langchain_core langchain-openailibrary and I'm hoping someone can assist me in resolving this issue.
Error Message:
AttributeError: 'str' object has no attribute 'model_dump'
Ex... | https://stackoverflow.com/questions/79317849/attributeerror-str-object-has-no-attribute-model-dump-in-langchain-core | python, openai-api, langchain | 1,735,568,425 |
se_78776974 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LangChain: Ensuring LLM Only Uses Explicitly Stated Information in Mental Health Assessment Tool | LangChain: Ensuring LLM Only Uses Explicitly Stated Information in Mental Health Assessment Tool
I'm developing a mental health assessment tool using LangChain and OpenAI. The goal is to analyze user inputs and answer predefined questions about their mental state based solely on the information explicitly stated in th... | https://stackoverflow.com/questions/78776974/langchain-ensuring-llm-only-uses-explicitly-stated-information-in-mental-health | openai-api, langchain | 1,721,623,469 |
se_78860751 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to Use OpenAI API for Embedding Generation with ChromaDB Without LangChain? | How to Use OpenAI API for Embedding Generation with ChromaDB Without LangChain?
I have been using OpenAIEmbeddings from LangChain, which is a model that doesn't require text input directly. I use it to store vector embeddings in ChromaDB with the following code:
db = Chroma(persist_directory=CHROMA_PATH, embedding_fun... | https://stackoverflow.com/questions/78860751/how-to-use-openai-api-for-embedding-generation-with-chromadb-without-langchain | openai-api, langchain, large-language-model, chromadb | 1,723,452,644 |
se_79413654 | stackoverflow | ARTIFICIAL_INTELLIGENCE | My LLM (GPT-4, Llama 2) give different responses for the same prompt | My LLM (GPT-4, Llama 2) give different responses for the same prompt
I am using an OpenAI GPT-4 API (also tested with Llama 2) to generate responses for a chatbot. However, I noticed that sometimes the model gives different answers even when the prompt is exactly the same.
Here is a minimal example:
import openai
prom... | https://stackoverflow.com/questions/79413654/my-llm-gpt-4-llama-2-give-different-responses-for-the-same-prompt | openai-api, large-language-model, gpt-4 | 1,738,729,994 |
se_79414172 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Azure OpenAI Chat Stuck using .Net SDK | Azure OpenAI Chat Stuck using .Net SDK
I have a program in .Net Core to describe an image using Azure OpenAPI GPT-4o model.
using Azure;
using Azure.AI.OpenAI;
using OpenAI;
using OpenAI.Chat;
using System;
using System.ClientModel;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
// A... | https://stackoverflow.com/questions/79414172/azure-openai-chat-stuck-using-net-sdk | python, .net, azure, openai-api, gpt-4o | 1,738,745,968 |
se_79414661 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to optimize gpt-4o-mini prompts for YouTube chat extension | How to optimize gpt-4o-mini prompts for YouTube chat extension
I’m building a Chrome extension that embeds a chat panel next to any YouTube video. This chat allows viewers to ask questions like “Summarize this video and give me the important timestamps,” and the model responds with context-aware answers.
For each vide... | https://stackoverflow.com/questions/79414661/how-to-optimize-gpt-4o-mini-prompts-for-youtube-chat-extension | openai-api, gpt-4 | 1,738,756,400 |
se_79412664 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to handle HTTP request timeout when using OpenAI streaming API and prevent “http2: response body closed” error? | How to handle HTTP request timeout when using OpenAI streaming API and prevent “http2: response body closed” error?
I am working on an application that uses the OpenAI API for streaming chat completion. The streaming works well, but I want to handle timeouts if the API doesn’t respond within a certain period. When I a... | https://stackoverflow.com/questions/79412664/how-to-handle-http-request-timeout-when-using-openai-streaming-api-and-prevent | go, http, timeout, openai-api, http2 | 1,738,693,187 |
se_79344167 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langchain: How to combine output from multiple prompt? | Langchain: How to combine output from multiple prompt?
I am trying to get the full output from each prompt combined as result.
Below is my code
import os
from constent import openai_key
from langchain_community.llms import OpenAI
import streamlit as st
from langchain import PromptTemplate
from langchain.chains im... | https://stackoverflow.com/questions/79344167/langchain-how-to-combine-output-from-multiple-prompt | python-3.x, openai-api, langchain, large-language-model | 1,736,460,674 |
se_77261548 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to appropriately use the Azure.AI.OpenAI.OpenAIClient.GetChatCompletionsStreamingAsync Method | How to appropriately use the Azure.AI.OpenAI.OpenAIClient.GetChatCompletionsStreamingAsync Method
I am working on a web application that will serve as the help system for one of my companies existing products. One of the features I have implemented is a chatbot that is powered by an Azure Open AI instance (using GPT 4... | https://stackoverflow.com/questions/77261548/how-to-appropriately-use-the-azure-ai-openai-openaiclient-getchatcompletionsstre | c#, openai-api, azure-cognitive-search, azure-openai | 1,696,882,600 |
se_79399279 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do i use agents in langgraph workflow | How do i use agents in langgraph workflow
tools = [check_user_promotion, get_local_data, get_kpi_info, list_all_kpis]
llm_with_tools = model.bind_tools(tools)
def reasoner(state: MessagesState):
message_history = [
msg for msg in state["messages"][:-1]
if isinstance(msg, (HumanMessage, AIMessage... | https://stackoverflow.com/questions/79399279/how-do-i-use-agents-in-langgraph-workflow | python, openai-api, langchain, large-language-model, langgraph | 1,738,227,071 |
se_79325692 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AttributeError: 'OpenAI' object has no attribute 'bind_tools' while creating a React Agent in LangGraph | AttributeError: 'OpenAI' object has no attribute 'bind_tools' while creating a React Agent in LangGraph
I'm trying to create a custom agent using langgraph and OpenAI in my Python project, but I'm encountering an error when using the create_react_agent function. Here's the code snippet that is causing ... | https://stackoverflow.com/questions/79325692/attributeerror-openai-object-has-no-attribute-bind-tools-while-creating-a-r | python, openai-api, langchain, langgraph | 1,735,887,035 |
se_77586219 | stackoverflow | ARTIFICIAL_INTELLIGENCE | WARNING - Can't find a Python library, got libdir=None, ldlibrary=None, multiarch=None, masd=None | WARNING - Can't find a Python library, got libdir=None, ldlibrary=None, multiarch=None, masd=None
Trying to install llama-cpp-python with "pip install llama-cpp-python". It is failing with following error.
pip install llama-cpp-python
Collecting llama-cpp-python
Using cached llama_cpp_python-0.2.20.tar.gz (8.7 M... | https://stackoverflow.com/questions/77586219/warning-cant-find-a-python-library-got-libdir-none-ldlibrary-none-multiarc | python, python-3.x, windows, openai-api, large-language-model | 1,701,443,150 |
se_79380579 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to deploy gpt4o-mini on Microsoft Azure and get a "Custom LLM URL" for integration? | How to deploy gpt4o-mini on Microsoft Azure and get a "Custom LLM URL" for integration?
I’m trying to deploy gpt4o-mini on Microsoft Azure to get a URL I can use as a "Custom LLM URL" in my AI application.
I’ve followed the documentation, created an Azure OpenAI resource, and tested the model in the playgrou... | https://stackoverflow.com/questions/79380579/how-to-deploy-gpt4o-mini-on-microsoft-azure-and-get-a-custom-llm-url-for-integ | azure, openai-api, large-language-model, azure-openai | 1,737,626,588 |
se_79362738 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Error calling the LLM using model API, using LlamaIndex | Error calling the LLM using model API, using LlamaIndex
I am trying to build an agent that searches in a database, but when I call the query, o LlamaIndex is calling the OpenAI's API apparently, when it should to call the Groq API.
Code:
model = 'llama-3.3-70b-versatile'
model_hf_emb = 'BAAI/bge-m3'
Settings.llm = Gro... | https://stackoverflow.com/questions/79362738/error-calling-the-llm-using-model-api-using-llamaindex | openai-api, large-language-model, llama, llama-index, groq | 1,737,052,644 |
se_77797590 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Error: The OPENAI_API_KEY environment variable is missing or empty | Error: The OPENAI_API_KEY environment variable is missing or empty
I'm building in next.js on replit and attempting to implement an OpenAI integration, but I can't get it to recognize my OpenAI key. I have it correctly added as a secret (replaces .env.local if you're unfamiliar with replit) but I still get this error.... | https://stackoverflow.com/questions/77797590/error-the-openai-api-key-environment-variable-is-missing-or-empty | typescript, next.js, openai-api, replit | 1,704,945,479 |
se_75079926 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to use an API from my mobile app without someone stealing the token | How to use an API from my mobile app without someone stealing the token
I'm building an app that makes use of the OpenAI API
They provide me with an API token which I use to make the API calls from my android mobile app (react native)
I know it is a bad practice to store this API token on the mobile client because att... | https://stackoverflow.com/questions/75079926/how-to-use-an-api-from-my-mobile-app-without-someone-stealing-the-token | android, react-native, security, openai-api | 1,673,424,376 |
se_79395080 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Cronjob message: "you didnt provide an API-Key" | Cronjob message: "you didnt provide an API-Key"
I have the following problem. I want to run a cronjob once a day within a Docker container
@daily /usr/local/bin/php /var/www/html/Tests/example.php
This script sends requests to ChatGPT. The corresponding OpenAIKey is stored in docker-compose.yaml as an envir... | https://stackoverflow.com/questions/79395080/cronjob-message-you-didnt-provide-an-api-key | php, docker, cron, openai-api | 1,738,095,378 |
se_77945088 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LangChainDeprecationWarning: Importing document loaders from langchain is deprecated. Importing from langchain will no longer be supported as of lang | LangChainDeprecationWarning: Importing document loaders from langchain is deprecated. Importing from langchain will no longer be supported as of lang
Im getting below warning and im able to reinstall pip but still it gives below warning.
Error:
.localpython/lib/python3.12/site-packages/langchain/document_loaders/init.... | https://stackoverflow.com/questions/77945088/langchaindeprecationwarning-importing-document-loaders-from-langchain-is-deprec | python, pip, openai-api, langchain, chromadb | 1,707,189,751 |
se_79102713 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Does Litellm package really support celery call with --pool=gevent | Does Litellm package really support celery call with --pool=gevent
I want to perform parallel call to llm model using litellm==1.49.7 package using celery with --pool=gevent
but I got following error how do I solve
response = loop.create_task(completion(
model=SELECTED_AI_MODEL,
... | https://stackoverflow.com/questions/79102713/does-litellm-package-really-support-celery-call-with-pool-gevent | python, python-asyncio, openai-api, large-language-model | 1,729,265,286 |
se_75794919 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to segment and transcribe an audio from a video into timestamped segments? | How to segment and transcribe an audio from a video into timestamped segments?
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 is similar to how YouTube now "auto-chapter... | https://stackoverflow.com/questions/75794919/how-to-segment-and-transcribe-an-audio-from-a-video-into-timestamped-segments | python, machine-learning, nlp, openai-api, automatic-speech-recognition | 1,679,343,286 |
se_79389971 | stackoverflow | ARTIFICIAL_INTELLIGENCE | WebRTC Connection Fails with OpenAI Realtime API in Production | WebRTC Connection Fails with OpenAI Realtime API in Production
I’m working on a WebRTC-based real-time application where the frontend (browser) connects to OpenAI’s Realtime API via a signaling server hosted on Cloudflare Workers. The project uses the following Cloudflare Workers sample code for the signaling server:
... | https://stackoverflow.com/questions/79389971/webrtc-connection-fails-with-openai-realtime-api-in-production | webrtc, openai-api | 1,737,962,330 |
se_76752539 | stackoverflow | ARTIFICIAL_INTELLIGENCE | TypeError: Cannot read property 'getReader' of undefined | TypeError: Cannot read property 'getReader' of undefined
When trying to stream the response of a fetch request, I get the following error: "TypeError: Cannot read property 'getReader' of undefined".
More specifically, I'm trying to use the OpenAI API, and am using standard code for streaming a ChatGPT response... | https://stackoverflow.com/questions/76752539/typeerror-cannot-read-property-getreader-of-undefined | react-native, fetch-api, openai-api | 1,690,186,406 |
se_79384459 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to convert UTF8 Hex to Hebrew letters in Flutter/Dart | How to convert UTF8 Hex to Hebrew letters in Flutter/Dart
In my Flutter app, using ChatGPT API (model gpt-4o-mini) and requesting a mixture of English and Hebrew in Json response, it receives the Hebrew as UTF8 Hex (each Hebrew character taking 2 bytes).
eg. "Sentence": "××××× ××× ××¦× ×©× ×¢×××ת ××× ×§××צ×ת ×× ×××... | https://stackoverflow.com/questions/79384459/how-to-convert-utf8-hex-to-hebrew-letters-in-flutter-dart | flutter, utf-8, openai-api, hebrew | 1,737,724,139 |
se_76509663 | stackoverflow | ARTIFICIAL_INTELLIGENCE | TypeError: JoypadSpace.reset() got an unexpected keyword argument 'seed', when I run the following code, what should I do to fix this? | TypeError: JoypadSpace.reset() got an unexpected keyword argument 'seed', when I run the following code, what should I do to fix this?
When I run this code:
from nes_py.wrappers import JoypadSpace
import gym
import gym_super_mario_bros
from gym_super_mario_bros.actions import SIMPLE_MOVEMENT
from gym.wrappers ... | https://stackoverflow.com/questions/76509663/typeerror-joypadspace-reset-got-an-unexpected-keyword-argument-seed-when-i | python, machine-learning, reinforcement-learning, openai-api, openai-gym | 1,687,204,050 |
se_79359201 | stackoverflow | ARTIFICIAL_INTELLIGENCE | 429 Too Many Requests" error when using the OpenAI API | 429 Too Many Requests" error when using the OpenAI API
I'm encountering a "429 Too Many Requests" error when using the OpenAI API in my web application. I've implemented a retry mechanism with exponential backoff, but the error persists even after retries. Here's the relevant part of my code:
async function getRe... | https://stackoverflow.com/questions/79359201/429-too-many-requests-error-when-using-the-openai-api | javascript, openai-api | 1,736,962,430 |
se_79384625 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Spring AI automatically assuming the model as gpt4o disregarding the configurations | Spring AI automatically assuming the model as gpt4o disregarding the configurations
I had a successfully running Spring AI project for a while. However, now when I run the project now, it throws me an odd error:
org.springframework.ai.retry.NonTransientAiException: 404 - {
"error": {
"message": "The model ... | https://stackoverflow.com/questions/79384625/spring-ai-automatically-assuming-the-model-as-gpt4o-disregarding-the-configurati | java, spring, openai-api, spring-ai | 1,737,727,695 |
se_78535109 | stackoverflow | ARTIFICIAL_INTELLIGENCE | BadRequestError: 400 Invalid content type. image_url is only supported by certain models | BadRequestError: 400 Invalid content type. image_url is only supported by certain models
I am trying to use Open ai's gpt-4-turbo model for image-to-text description generation
but I am facing this issue- BadRequestError: 400 Invalid content type. image_url is only supported by certain models.
app.post('/analyze-image... | https://stackoverflow.com/questions/78535109/badrequesterror-400-invalid-content-type-image-url-is-only-supported-by-certai | node.js, openai-api | 1,716,722,917 |
se_75394143 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API error: "No module named 'openai.embeddings_utils'; 'openai' is not a package" | OpenAI API error: "No module named 'openai.embeddings_utils'; 'openai' is not a package"
I want to use openai.embeddings_utils import get_embeddings
So already install openai
Name: openai
Version: 0.26.5
Summary: Python client library for the OpenAI API
Home-page: https://github.com/openai/op... | https://stackoverflow.com/questions/75394143/openai-api-error-no-module-named-openai-embeddings-utils-openai-is-not-a | python, python-3.x, pip, openai-api, azure-openai | 1,675,916,163 |
se_78986588 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Question on how to make an openai assistant made with assistants api ui call an external API? | Question on how to make an openai assistant made with assistants api ui call an external API?
I am developing a chatbot for my company, and I have created middleware in Spring Boot to access my assistant using API calls (make a thread and send messages on it, create a run and then receive a message response from the a... | https://stackoverflow.com/questions/78986588/question-on-how-to-make-an-openai-assistant-made-with-assistants-api-ui-call-an | spring-boot, openai-api, chatgpt-api, openai-assistants-api, chatgpt-function-call | 1,726,372,147 |
se_77904694 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to get the combine result from multiple vectors stored in Pinecone? | How to get the combine result from multiple vectors stored in Pinecone?
We have generated vector embeddings using OpenAI from our custom data file which is in .xlsx format and stored the vectors in Pinecone, we are now trying to put query using pinecone index and get the result from the stored vectors whatever the bes... | https://stackoverflow.com/questions/77904694/how-to-get-the-combine-result-from-multiple-vectors-stored-in-pinecone | openai-api, langchain, pinecone, openaiembeddings, semantic-search | 1,706,601,516 |
se_78020474 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Got an error when I tried to use the Openai SDK in Node.js | Got an error when I tried to use the Openai SDK in Node.js
I am trying to use Openai api with nodejs, I follow the tutorial and want to add a simple gpt text completion feauture using the openai SDK, but I got an error says: /node_modules/openai/core.js:44
const isJSON = contentType?.includes('application/json') || co... | https://stackoverflow.com/questions/78020474/got-an-error-when-i-tried-to-use-the-openai-sdk-in-node-js | node.js, openai-api | 1,708,343,902 |
se_78953075 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Completions.create() got an unexpected keyword argument 'request_timeout' | Completions.create() got an unexpected keyword argument 'request_timeout'
I am using Autogen from microsoft with the below code:
import autogen
from autogen import AssistantAgent, UserProxyAgent
config_list = [
{
'model': 'gpt-4',
'api_key': 'API_KEY'
}
]
llm_config={
"request_tim... | https://stackoverflow.com/questions/78953075/completions-create-got-an-unexpected-keyword-argument-request-timeout | python, artificial-intelligence, openai-api, ms-autogen | 1,725,539,865 |
se_78991862 | stackoverflow | ARTIFICIAL_INTELLIGENCE | getting model not found for text completion (g4f) | getting model not found for text completion (g4f)
I want to prompt g4f with a simple question but the exception I get each time was model not found:
import g4f
allowed_models = [
'code-davinci-002',
'text-ada-001',
'text-babbage-001',
'text-curie-001',
'text-davinci-002',
'text-davinci-003'
]
... | https://stackoverflow.com/questions/78991862/getting-model-not-found-for-text-completion-g4f | openai-api, chatgpt-api | 1,726,522,254 |
se_76366387 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to successfully transcribe audio files using Whisper for OpenAI in Python? | How to successfully transcribe audio files using Whisper for OpenAI in Python?
I´m trying to use Whisper model but occours an error saying:
UserWarning: FP16 is not supported on CPU; using FP32 instead
warnings.warn("FP16 is not supported on CPU; using FP32 instead")
file not found.
exiting process.
my code:
import wh... | https://stackoverflow.com/questions/76366387/how-to-successfully-transcribe-audio-files-using-whisper-for-openai-in-python | python, path, openai-api, transcription, openai-whisper | 1,685,460,429 |
se_79355398 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Not Support connection type None for embedding api. Connection type should be in [AzureOpenAI, OpenAI] | Not Support connection type None for embedding api. Connection type should be in [AzureOpenAI, OpenAI]
I am working on this project, https://github.com/Azure-Samples/ai-rag-chat-evaluator.
I am getting the following error while running evaluation with the below line,
python -m evaltools evaluate --config=example_confi... | https://stackoverflow.com/questions/79355398/not-support-connection-type-none-for-embedding-api-connection-type-should-be-in | openai-api, azure-openai, rag, openaiembeddings | 1,736,866,008 |
se_79363806 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to ensure OpenAI realtime provides strict literal language translations with out extra details | How to ensure OpenAI realtime provides strict literal language translations with out extra details
Currently am working on the language translation between 2 callers using Twilio and open ai real time, using Twilio am fetching the audio stream and pushing the audio stream to openai websocket as below.
const audioAppe... | https://stackoverflow.com/questions/79363806/how-to-ensure-openai-realtime-provides-strict-literal-language-translations-with | node.js, openai-api, openai-whisper | 1,737,095,069 |
se_75041580 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API giving error: 429 Too Many Requests | OpenAI API giving error: 429 Too Many Requests
I am trying to make a request to the openai API with the following code in express nodeJS:
import { Configuration, OpenAIApi } from "openai";
const configuration = new Configuration({
organization: "org-Fn2EqsTpiUCTKb8m61wr6H8m",
apiKey: "xxxxxxxxxxxxxxxxxxxxxxxx... | https://stackoverflow.com/questions/75041580/openai-api-giving-error-429-too-many-requests | node.js, express, openai-api, http-status-code-429 | 1,673,105,884 |
se_78591326 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Getting OpenAI API Error While Using Groq API for Python Coding Agent | Getting OpenAI API Error While Using Groq API for Python Coding Agent
I am trying to create a Python coding agent using the crewai library along with langchain and ChatGroq. My code is supposed to use the Groq API for language model processing, but I am encountering an error related to OpenAI's API instead
Here's my c... | https://stackoverflow.com/questions/78591326/getting-openai-api-error-while-using-groq-api-for-python-coding-agent | python, openai-api, langchain, groq, crewai | 1,717,756,207 |
se_79340796 | stackoverflow | ARTIFICIAL_INTELLIGENCE | In R POST request OpenAI API Error in curl::curl_fetch_memory() | In R POST request OpenAI API Error in curl::curl_fetch_memory()
This is my code:
A simple POST() request to OpenAI API:
# General API completion endpoint
endpoint <- "https://api.openai.com/v1/chat/completions"
# Combine a Prompt with the document
prompt <- "Summarise this book for me. Split into 5 parts.."
text_pro... | https://stackoverflow.com/questions/79340796/in-r-post-request-openai-api-error-in-curlcurl-fetch-memory | r, openai-api, httr, httr2 | 1,736,371,698 |
se_79359234 | stackoverflow | ARTIFICIAL_INTELLIGENCE | aapply call failing in LLMChain - OpenAIObject | aapply call failing in LLMChain - OpenAIObject
I had a working code to translate documents (pdf, docx and text). Suddenly since past few days, I am getting following error. There has been no change in the code.
Error in doc_translate_openai of openai i.e unsupported operand type(s) for +=: 'OpenAIObject' and 'OpenAIOb... | https://stackoverflow.com/questions/79359234/aapply-call-failing-in-llmchain-openaiobject | openai-api, langchain, azure-openai, py-langchain | 1,736,963,342 |
se_76662319 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I store an ObjectIndex in my file system so I don't need to recreate it every time with LlamaIndex? | How can I store an ObjectIndex in my file system so I don't need to recreate it every time with LlamaIndex?
Starting off by saying that I'm totally new to this, so super thankful for any help I can get!
I have the following code (from one of the SQL examples from LlamaIndex's website)
engine = create_engine('url')... | https://stackoverflow.com/questions/76662319/how-can-i-store-an-objectindex-in-my-file-system-so-i-dont-need-to-recreate-it | python, openai-api, llama-index | 1,689,080,899 |
se_79354638 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Remove leading space from Shell GPT code output? | Remove leading space from Shell GPT code output?
I'm using Shell GPT to send queries to GPT from Linux terminal. One problem - it prints a space before each line of code it gives, for example:
#!/bin/bash
# Get the current date and time
current_date_time=$(date '+%Y-%m-%d %H:%M:%S')
This leading space is ... | https://stackoverflow.com/questions/79354638/remove-leading-space-from-shell-gpt-code-output | python, openai-api, chatgpt-api | 1,736,849,660 |
se_79353513 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Issue with LangChain Agent: Email Sending Tool Not Following Established Rules | Issue with LangChain Agent: Email Sending Tool Not Following Established Rules
Problem Description:
I’m developing an agent using LangChain, langchain_openai, and a custom tool to send emails. The tool, named mail_tool, is designed to follow a strict set of rules and a specific input format for sending emails. However... | https://stackoverflow.com/questions/79353513/issue-with-langchain-agent-email-sending-tool-not-following-established-rules | python, openai-api, langchain, py-langchain, langchain-agents | 1,736,804,881 |
se_79349985 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to attach image file with purpose vision to OpenAI assistant thread? | How to attach image file with purpose vision to OpenAI assistant thread?
I want to upload an image file to my OpenAI assistant thread. I specifically want the file to not be used by code_interpreter or file_search. How can this be achieved? | https://stackoverflow.com/questions/79349985/how-to-attach-image-file-with-purpose-vision-to-openai-assistant-thread | javascript, node.js, typescript, openai-api | 1,736,689,332 |
se_79345928 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Audio-to-Text Transcription Method with ChatGPT, LiveKit, and Flutter | Audio-to-Text Transcription Method with ChatGPT, LiveKit, and Flutter
I’m trying to implement audio transcription generated by ChatGPT and display it in a LiveKit video with a camera, allowing the user to chat with the bot. The problem is that, at the moment, I can only list the local transcription (the audio sent by ... | https://stackoverflow.com/questions/79345928/audio-to-text-transcription-method-with-chatgpt-livekit-and-flutter | flutter, stream, openai-api, chatgpt-api, livekit | 1,736,517,160 |
se_75898276 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API error 429: "You exceeded your current quota, please check your plan and billing details" | OpenAI API error 429: "You exceeded your current quota, please check your plan and billing details"
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 details
My script is th... | https://stackoverflow.com/questions/75898276/openai-api-error-429-you-exceeded-your-current-quota-please-check-your-plan-a | python, prompt, openai-api, completion, chatgpt-api | 1,680,263,884 |
se_79180421 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Azure OpenAI assistants API: Invalid parameter: 'response_format' of type 'json_schema' is not supported with model version `gpt-4o-08-06` | Azure OpenAI assistants API: Invalid parameter: 'response_format' of type 'json_schema' is not supported with model version `gpt-4o-08-06`
I have deployed GPT 4o 2024-08-06 in Sweden Central called gpt-4o-08-06. I am using the assistants API and making this call (Output is a pydantic model):
run = ai_c... | https://stackoverflow.com/questions/79180421/azure-openai-assistants-api-invalid-parameter-response-format-of-type-json | openai-api, azure-openai | 1,731,402,198 |
se_79199510 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to count # of tokens consumed by OpenAI Assistant while streaming the message | How to count # of tokens consumed by OpenAI Assistant while streaming the message
I am using openAI Assistant, I get the streamingUpdate using
streamingUpdate = assistantClient.CreateRunStreaming(thread, assistant);
I could iterate through streamingUpdate and send the response to the client using SignalR api. howeve... | https://stackoverflow.com/questions/79199510/how-to-count-of-tokens-consumed-by-openai-assistant-while-streaming-the-messag | c#, artificial-intelligence, openai-api, azure-openai | 1,731,924,864 |
se_79337989 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Azure OpenAI Completion Request fails | Azure OpenAI Completion Request fails
I had a RAG web service that I built, and it was working about 6 months ago. Recently I tired it, and it was not working completely.
I realized that your SDK changed, and models had been deprecated and replaced by new ones, and yet, I am not able to make it work.
Here is the code ... | https://stackoverflow.com/questions/79337989/azure-openai-completion-request-fails | c#, asp.net, azure, openai-api | 1,736,311,538 |
se_79336334 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI .NET SDK 2.1.0: How to Replace CompletionRequest and Completions? | OpenAI .NET SDK 2.1.0: How to Replace CompletionRequest and Completions?
OpenAI .NET SDK 2.1.0: How to Replace CompletionRequest and Completions?
I recently updated the OpenAI .NET SDK from version 1.11.0 to 2.1.0 in my project. After the update, I noticed that the following components are no longer available:
Comple... | https://stackoverflow.com/questions/79336334/openai-net-sdk-2-1-0-how-to-replace-completionrequest-and-completions | c#, .net, openai-api | 1,736,260,107 |
se_78141292 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to keep conversation context of multiple users separate for LLM chatbot coded in Python-Flask | How to keep conversation context of multiple users separate for LLM chatbot coded in Python-Flask
Apologies in advance as this is probably an easy thing to fix. I'm still new to programming and learning as I go.
I'm working on a chatbot using Python Flask, OpenAI's LLM, and the LLAMA Index library. It’s currently bein... | https://stackoverflow.com/questions/78141292/how-to-keep-conversation-context-of-multiple-users-separate-for-llm-chatbot-code | python, flask, openai-api, large-language-model, llama-index | 1,710,166,558 |
se_77222666 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Is there the way to develop ChatGPT's plugins without access to plugin development? | Is there the way to develop ChatGPT's plugins without access to plugin development?
To develop a plugin, there is button "Develop your own plugin" should be seen in Plugin Store for GPT-4 model, which means to add your plugin from localhost. It is available for users who has been approved as plugin developers.
Our... | https://stackoverflow.com/questions/77222666/is-there-the-way-to-develop-chatgpts-plugins-without-access-to-plugin-developme | openai-api, chatgpt-api, chat-gpt-4, chatgpt-plugin | 1,696,339,405 |
se_79324358 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Azure Open AI from SPA apps without backends | Azure Open AI from SPA apps without backends
I am building a ReactJS app without a backend. I am using Azure Open AI service via LangChainJS/LangGraphJS.
Though I can ground model/provide system prompts using Javascript and LagChain making sure the model only answers questions related to my Web App, anyone with a netw... | https://stackoverflow.com/questions/79324358/azure-open-ai-from-spa-apps-without-backends | azure, openai-api, langchain, azure-openai, langchain-js | 1,735,835,124 |
se_79330812 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Azure OpenAI unable to access Azure Storage Blob URL | Azure OpenAI unable to access Azure Storage Blob URL
I have an Azure Storage account that has a private endpoint in a Virtual Network.
I created a SAS blob URL for an Image present in that Storage account
I passed that URL as image_url in gpt4o model but its giving me this error:
BadRequestError: Error code: 400 - {'e... | https://stackoverflow.com/questions/79330812/azure-openai-unable-to-access-azure-storage-blob-url | azure, azure-blob-storage, openai-api, azure-openai, gpt-4 | 1,736,084,074 |
se_73117628 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to solve API connection error and SSL certification error while connecting to GPT-3 open AI? | How to solve API connection error and SSL certification error while connecting to GPT-3 open AI?
I am trying to run a python script (jupyter notebook) by experimenting with GPT-3 open AI to create some NLP project and understand its functions and used cases. I got an error of SSL certification and API connection while... | https://stackoverflow.com/questions/73117628/how-to-solve-api-connection-error-and-ssl-certification-error-while-connecting-t | python, openai-api | 1,658,808,432 |
se_79328516 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Pandas DataFrame not populating as expected from JSON data produced by OpenAI API | Pandas DataFrame not populating as expected from JSON data produced by OpenAI API
I'm trying to populate a Pandas DataFrame from JSON data (details of CEO of respective fortune 500 companies) returned by OpenAI API. Here's a sample of the data that I am working with.
sample_df = pd.DataFrame({
'Rank': [1, 2, 3],
... | https://stackoverflow.com/questions/79328516/pandas-dataframe-not-populating-as-expected-from-json-data-produced-by-openai-ap | python, json, pandas, dataframe, openai-api | 1,735,981,074 |
se_79315600 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to call OpenAi function from python | How to call OpenAi function from python
I generated a function using OpenAI as below:
So the function definition is (json schema):
{
"name": "generate_jokes",
"description": "Generate 3 jokes based on input text",
"strict": true,
"parameters": {
"type": "object",
"required": [
"input_text",
... | https://stackoverflow.com/questions/79315600/how-to-call-openai-function-from-python | python, function, openai-api | 1,735,476,087 |
se_79323626 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Indexing excel files in Azure | Indexing excel files in Azure
I stored excel files in Azure Blob Storage and now I am trying to index the excel files using Azure AI Search but I could not do it. Everytime I try,it throws an error notification saying failed to create index.Can someone help me resolving the problem ?
I want to build a chatbot using az... | https://stackoverflow.com/questions/79323626/indexing-excel-files-in-azure | python, azure, chatbot, openai-api, azure-ai-search | 1,735,819,080 |
se_78105482 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API: How do I print all available OpenAI models in Google Colab? | OpenAI API: How do I print all available OpenAI models in Google Colab?
I want to print the available OpenAI models in Google Colab.
I installed and imported the OpenAI Python SDK, provided the API key, and called the list function, but I'm getting the following error:
You tried to access openai.Model, but this is no... | https://stackoverflow.com/questions/78105482/openai-api-how-do-i-print-all-available-openai-models-in-google-colab | python-3.x, model, google-colaboratory, openai-api | 1,709,616,343 |
se_79323765 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Create native picture embeddings and then make a similarity search with text | Create native picture embeddings and then make a similarity search with text
Is it generally possible to create image embeddings directly (without additional text) and store them in a database? The aim is to make the content of the images findable later via a text input in the front end using a similarity search. Is t... | https://stackoverflow.com/questions/79323765/create-native-picture-embeddings-and-then-make-a-similarity-search-with-text | python, openai-api, large-language-model, word-embedding | 1,735,822,232 |
se_78242067 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Setting up an API Key in the MacOS terminal, for beginner | Setting up an API Key in the MacOS terminal, for beginner
I am completely new, bear with me.
I have Python 3.11.4 installed on my Mac.
According to the OpenAI Quickstart guide, I must install the OpenAI Python library by running pip install --upgrade openai in my terminal. (Side note, I'm using the Terminal from the s... | https://stackoverflow.com/questions/78242067/setting-up-an-api-key-in-the-macos-terminal-for-beginner | jupyter-notebook, terminal, openai-api, chatgpt-api | 1,711,688,222 |
se_79321187 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to specify the response format in langchain-go when using structured JSON mode? | How to specify the response format in langchain-go when using structured JSON mode?
when usign the openai go api library (openai-go), i can specify to use the structured JSON response mode in the ChatCompletionParams, where the ResponseFormat field takes the JSONSchema as a parameter like so:
params := openai.ChatComp... | https://stackoverflow.com/questions/79321187/how-to-specify-the-response-format-in-langchain-go-when-using-structured-json-mo | json, go, openai-api, langchain, large-language-model | 1,735,708,510 |
se_77952454 | stackoverflow | ARTIFICIAL_INTELLIGENCE | method in python 'Stream_to_file' not working | method in python 'Stream_to_file' not working
Working with OpenAI API and below is my simple code, but getting deprecation warning for 'steam_to_file' method.
Code -
from openai import OpenAI
from pathlib import Path
client = OpenAI(
api_key=os.getenv("OPENAI_API_KEY"),
)
speech_file_path = Path(__file__)... | https://stackoverflow.com/questions/77952454/method-in-python-stream-to-file-not-working | python-3.x, text-to-speech, openai-api | 1,707,284,830 |
se_78907471 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Getting Invalid JSON Error with dynamic values when trying to initialize openai api call | Getting Invalid JSON Error with dynamic values when trying to initialize openai api call
im trying to initilaize this api call with dynamic values in the <>:
``
{
"model": "gpt-4o-mini",
"messages": [
{
"role": "user",
"content": <prompt>
}
],
"temperature": <tem... | https://stackoverflow.com/questions/78907471/getting-invalid-json-error-with-dynamic-values-when-trying-to-initialize-openai | json, openai-api, bubble.io | 1,724,444,705 |
se_79313139 | stackoverflow | ARTIFICIAL_INTELLIGENCE | vector store stuck with file counts in_progress or vector store is empty | vector store stuck with file counts in_progress or vector store is empty
I am trying to upload 2 json files into an assistants vector store using the official openAI python library. I also want to use a specific chunking strategy, and a different one for each files.
There are 2 approaches i found to be possible to upl... | https://stackoverflow.com/questions/79313139/vector-store-stuck-with-file-counts-in-progress-or-vector-store-is-empty | python, openai-api, vectorstore | 1,735,354,644 |
se_77791790 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI Completions API response content is not full | OpenAI Completions API response content is not full
I have a python script that uses the official OpenAI library, that I'm using to generate some scripts by a specific recipe I'm telling it.
I thought the problem was I'm not streaming the response so now it is also uses the stream=True option.
Now, if the response is ... | https://stackoverflow.com/questions/77791790/openai-completions-api-response-content-is-not-full | openai-api, chatgpt-api | 1,704,874,491 |
se_79311940 | stackoverflow | ARTIFICIAL_INTELLIGENCE | My Docker container is not connecting with open ai when I run python code | My Docker container is not connecting with open ai when I run python code
I am trying to create an agent in OPEN AI, that would authenticate with VS code server based on user input. The VS code server is running in docker container docker-vscode-1. I ran following code in docker container:
import os
import requests
im... | https://stackoverflow.com/questions/79311940/my-docker-container-is-not-connecting-with-open-ai-when-i-run-python-code | python, docker, openai-api | 1,735,306,610 |
se_79310491 | stackoverflow | ARTIFICIAL_INTELLIGENCE | "Expected an object and got a string instead" issue with ask_chatgpt in R | "Expected an object and got a string instead" issue with ask_chatgpt in R
I'm trying to run the ask_chatgpt function through multiple lines in R. A basic example:
Loading the basic information, excluding the API:
### load current ChatGPT package: https://github.com/jcrodriguez1989/chatgpt
install.packages("c... | https://stackoverflow.com/questions/79310491/expected-an-object-and-got-a-string-instead-issue-with-ask-chatgpt-in-r | r, openai-api | 1,735,249,550 |
se_78821121 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API return 400 Error: cannot transcribe ogg file | OpenAI API return 400 Error: cannot transcribe ogg file
I want to create async func for transcribing telegram voices (.ogg files), but when i try send request to OpenAI API i recive error:
Error code: 400 - {'error': {'message': "Unrecognized file format.
Supported formats: ['flac', 'm4a', 'mp3', 'mp4', 'mpeg', 'mpga... | https://stackoverflow.com/questions/78821121/openai-api-return-400-error-cannot-transcribe-ogg-file | python, asynchronous, openai-api, openai-whisper | 1,722,517,454 |
se_79309701 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Replace OpenAI Assistant File Citations with Sequential Reference Numbers using AI SDK | Replace OpenAI Assistant File Citations with Sequential Reference Numbers using AI SDK
I'm building a NuxtJS application using Vercel's AI SDK to interact with OpenAI's Assistants API. When the assistant references files in its responses, it generates citations in this format: 【4:2†Source】.
I need to replace these ran... | https://stackoverflow.com/questions/79309701/replace-openai-assistant-file-citations-with-sequential-reference-numbers-using | node.js, google-cloud-functions, openai-api, openai-assistants-api, vercel-ai | 1,735,223,105 |
se_75784246 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Discord 14 OpenAI integration | Discord 14 OpenAI integration
I'm trying to integrate OpenAI to Discord bot, but for some reason, I'm not able to get the response from the ChatGPT. I'm not sure where the issue is.
I have confirmed that the API key is correct
I have confirmed that org ID is also correct
I have confirmed that the prompt from the user... | https://stackoverflow.com/questions/75784246/discord-14-openai-integration | node.js, discord, request, openai-api | 1,679,251,647 |
se_75657590 | stackoverflow | ARTIFICIAL_INTELLIGENCE | GPT 3.5 Turbo integration with Dialogflow | GPT 3.5 Turbo integration with Dialogflow
I am trying to integrate Dialogflow bot with new openai API GPT 3.5 Turbo in Node.js using google cloud functions. I have below code which throws error "finished with status code: 404". I have two other files as well. I tried with with text davinci 003 and it was working fine.... | https://stackoverflow.com/questions/75657590/gpt-3-5-turbo-integration-with-dialogflow | node.js, express, google-cloud-functions, openai-api | 1,678,156,751 |
se_79307049 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Module '"ai"' has no exported member 'OpenAIStream' | Module '"ai"' has no exported member 'OpenAIStream'
I have been trying to import "OpenAIStream" and "StreamingTextResponse" from 'ai' package in next js, but I get this error:
Attempted import error: 'StreamingTextResponse' is not exported from 'ai' (imported as 'StreamingTextResponse').
the... | https://stackoverflow.com/questions/79307049/module-ai-has-no-exported-member-openaistream | next.js, stream, openai-api | 1,735,111,124 |
se_76314725 | stackoverflow | ARTIFICIAL_INTELLIGENCE | What is the correct way to provide a File object to the OpenAI Whisper API in Node.js? | What is the correct way to provide a File object to the OpenAI Whisper API in Node.js?
Suppose I want to download a file from a URL and then call the whisper API to transcribe it.
I would do it as the documentation suggests:
const resp = await openai.createTranscription(
fs.createReadStream("audio.mp3"),
"whisper... | https://stackoverflow.com/questions/76314725/what-is-the-correct-way-to-provide-a-file-object-to-the-openai-whisper-api-in-no | node.js, typescript, openai-api | 1,684,844,648 |
se_78162385 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Having Problems with AzureChatOpenAI() | Having Problems with AzureChatOpenAI()
people. I'm trying to use the AzureChatOpenAI(), but even if I put the right parameters, it doesn't work. Here it is:
from langchain_core.messages import HumanMessage
from langchain_openai import AzureChatOpenAI
import os
os.environ['AZURE_OPENAI_DEPLOYMENT_NAME'] = "..."
os.env... | https://stackoverflow.com/questions/78162385/having-problems-with-azurechatopenai | python, azure, openai-api, langchain, azure-openai | 1,710,437,337 |
se_77795681 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to specify OpenAI Organization ID in Microsoft AutoGen? | How to specify OpenAI Organization ID in Microsoft AutoGen?
In order to create a "config_list" for OpenAI in Microsoft AutoGen I do the following:
import os
config_list = [{
'model': 'gpt-3.5-turbo-1106',
'api_key': os.getenv("OPENAI_API_KEY"),
}]
How does one specify an OpenAI organization ID?
P.S. - I didn't fi... | https://stackoverflow.com/questions/77795681/how-to-specify-openai-organization-id-in-microsoft-autogen | python, openai-api, ms-autogen | 1,704,911,761 |
se_77797142 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to specify conversation history in Microsoft AutoGen? | How to specify conversation history in Microsoft AutoGen?
Backstory: I'm integrating AutoGen as one method to further a conversation in my application (versus simply calling OpenAI's chat completion directly for example).
How do I inject my own messages into a user_proxy chat history?
Here's what I have thus far:
assi... | https://stackoverflow.com/questions/77797142/how-to-specify-conversation-history-in-microsoft-autogen | openai-api, azure-openai, ms-autogen | 1,704,934,743 |
se_78275781 | stackoverflow | ARTIFICIAL_INTELLIGENCE | What's the recommended way of function calling in Microsoft Autogen? | What's the recommended way of function calling in Microsoft Autogen?
I saw that function calling in Autogen is done in several ways. Official tutorials use the register function or user_proxy.register_for_execution methods, while some of the 3rd party tutorials I saw use "functions": (function name) with llm_confi... | https://stackoverflow.com/questions/78275781/whats-the-recommended-way-of-function-calling-in-microsoft-autogen | openai-api, ms-autogen | 1,712,253,861 |
se_79298071 | stackoverflow | ARTIFICIAL_INTELLIGENCE | 400 Unsupported data type | Azure open ai assistant issue? | 400 Unsupported data type | Azure open ai assistant issue?
I'm having an issue with azure open ai where all the api details are correct and when i do chat completion it works but the ai assistant don't want to work even tho i'm followin the azure open ai docs, here it is my code:
const
dotenv = require("dotenv");
dot... | https://stackoverflow.com/questions/79298071/400-unsupported-data-type-azure-open-ai-assistant-issue | azure, openai-api, large-language-model, azure-openai | 1,734,717,988 |
se_79296641 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AsyncAzureOpenAI Client from openai python SDK support for Custom Fast API Endpoint | AsyncAzureOpenAI Client from openai python SDK support for Custom Fast API Endpoint
I am working on a project where the team has developed custom LLM asynchronous API endpoints using FastAPI and AzureOpenAI and the application uses a B2B token for authenticating user requests. But now we want to test those endpoints u... | https://stackoverflow.com/questions/79296641/asyncazureopenai-client-from-openai-python-sdk-support-for-custom-fast-api-endpo | openai-api, azure-openai | 1,734,684,095 |
se_75790862 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI GPT-3 API: Why do I get a response that makes no sense in relation to the question? | OpenAI GPT-3 API: Why do I get a response that makes no sense in relation to the question?
When I ask a question in parameters of the request, the response has no sentence, and i get other questions in the response. I tried with every "temperature" and the response is never the same that I could get on chatGPT-3. I al... | https://stackoverflow.com/questions/75790862/openai-gpt-3-api-why-do-i-get-a-response-that-makes-no-sense-in-relation-to-the | openai-api, gpt-3 | 1,679,318,870 |
se_78754455 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Convert openAi functions to gemini function calling | Convert openAi functions to gemini function calling
When having a projet that deal multiple Generative AI provider, I must have a quick way to "translate" the Function Calling Tools from one provider to another.
Having a object with tools to be used with openAi SDK, how to convert it to Gemini Tools?
Sample tool list:... | https://stackoverflow.com/questions/78754455/convert-openai-functions-to-gemini-function-calling | openai-api, google-gemini | 1,721,131,533 |
se_78660088 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How does streaming work in OpenAI's APIs? | How does streaming work in OpenAI's APIs?
I have a basic understanding of how event streams work. I am currently converting langchain code to directly use OpenAI's API and I have a piece of code I am a bit confused about.
def stream_message(
messages
):
client = OpenAI(api_key=settings.OPENAI_API_KEY)
... | https://stackoverflow.com/questions/78660088/how-does-streaming-work-in-openais-apis | python, stream, openai-api, server-sent-events, chatgpt-api | 1,719,185,527 |
se_75568896 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Outputs from OpenAI Api is delayed and random | Outputs from OpenAI Api is delayed and random
When i type less than 3-5 characters, OpenAI API replies with random output and delayed for like 5 seconds (based on how long openai output is). Tried changing model and lowering max_tokens to 500.
#main.JS
const userInput = document.querySelector('.user-input');
const in... | https://stackoverflow.com/questions/75568896/outputs-from-openai-api-is-delayed-and-random | javascript, openai-api | 1,677,364,965 |
se_78955996 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Unable to use openai api key and endpoint using python - - openai.NotFoundError: Error code: 404 | Unable to use openai api key and endpoint using python - - openai.NotFoundError: Error code: 404
I am trying to connect open ai api and endpoint of Azure Ai Studio with pyhton my code is this:
#code1:
import os
from openai import AzureOpenAI
client = AzureOpenAI(
azure_endpoint = "https://demo1.openai.azure.com/",
... | https://stackoverflow.com/questions/78955996/unable-to-use-openai-api-key-and-endpoint-using-python-openai-notfounderror | azure, openai-api, azure-openai, azure-ai | 1,725,606,485 |
se_79296189 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I fix; openai.BadRequestError: Error code: 400? | How do I fix; openai.BadRequestError: Error code: 400?
from openai import OpenAI
prompt = input("What would you like an image of? ")
def generate_image(prompt):
response = (client.images.generate(
model="dall-e-3",
prompt=prompt,
n=1,
quality="standard",
size="1024x1024"
... | https://stackoverflow.com/questions/79296189/how-do-i-fix-openai-badrequesterror-error-code-400 | python, pycharm, openai-api | 1,734,668,914 |
se_79295751 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Do Azure OpenAI o1 GPT model support image analysis like GPT Vision? | Do Azure OpenAI o1 GPT model support image analysis like GPT Vision?
I'm exploring Azure OpenAI and noticed some interesting reasoning capabilities mentioned in the documentation. I wanted to know if the o1 GPT model support image analysis similar to GPT Vision.
For example, could I use something like this to analyze ... | https://stackoverflow.com/questions/79295751/do-azure-openai-o1-gpt-model-support-image-analysis-like-gpt-vision | azure, openai-api, azure-openai | 1,734,647,676 |
se_79292087 | stackoverflow | ARTIFICIAL_INTELLIGENCE | finding similarity of keywords between many product reviews to detect duplicates | finding similarity of keywords between many product reviews to detect duplicates
I have a series of product reviews from multiple websites and am trying to identify reviews that are potentially duplicates (ie very similar in the words used). I know there's a lot of room for potential ambiguity here but hopoing there's... | https://stackoverflow.com/questions/79292087/finding-similarity-of-keywords-between-many-product-reviews-to-detect-duplicates | spacy, openai-api | 1,734,545,376 |
se_75979815 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to add 'message history' to llama-index based GPT-3 in Python | How to add 'message history' to llama-index based GPT-3 in Python
I am fairly new to using llama-index library for training GPT-3 as well as using ChatGPT through the standard API (both in Python). I have noticed that standard ChatGPT API i could simply do the following code below to have ChatGPT get message h... | https://stackoverflow.com/questions/75979815/how-to-add-message-history-to-llama-index-based-gpt-3-in-python | python, openai-api, gpt-3, llama-index, gpt-index | 1,681,152,319 |
se_77258267 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI remove key access while using AAD authentication | OpenAI remove key access while using AAD authentication
I am calling Azure OpenAI API in my python code. To set it up, we need to provide a few parameters, one of which is openai.api_key. There are 2 options to get this value -
Static key
AAD Token
I am using AAD token (refer this - https://github.com/openai/openai-... | https://stackoverflow.com/questions/77258267/openai-remove-key-access-while-using-aad-authentication | python, azure, azure-active-directory, openai-api, chatgpt-api | 1,696,849,351 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.