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_78915366 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Can you specify a container query in the Azure Ingestion Job API? | Can you specify a container query in the Azure Ingestion Job API?
I have setup to use the Azure OpenAI Service Ingestion Job API, and now I wonder if it's possible to specify a container query in the API? I have a lot of folders inside my container, and I only want to run the ingestion job on one virtual folder in the... | https://stackoverflow.com/questions/78915366/can-you-specify-a-container-query-in-the-azure-ingestion-job-api | azure, openai-api, azure-openai | 1,724,688,245 |
se_78910862 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Parallel Processing with Asynchronous Calls for OpeanAI API | Parallel Processing with Asynchronous Calls for OpeanAI API
I have written an app to fetch news from certain rss feeds and do some processes on them using chatgpt api.
I have scheduled fetching news and processing them every minute task, Then it caused problem. Every minute let's say script fetches 300 news, and chatg... | https://stackoverflow.com/questions/78910862/parallel-processing-with-asynchronous-calls-for-opeanai-api | django, openai-api | 1,724,577,626 |
se_78910199 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to resolve "None of the provided servers are under the root origin" error when specifying port in OpenAI Custom GPT API schema? | How to resolve "None of the provided servers are under the root origin" error when specifying port in OpenAI Custom GPT API schema?
I'm working with OpenAI's Custom GPT and trying to integrate it with my API using an OpenAPI specification. My API is hosted on a server that requires a specific port (e.g., 944... | https://stackoverflow.com/questions/78910199/how-to-resolve-none-of-the-provided-servers-are-under-the-root-origin-error-wh | openapi, openai-api | 1,724,543,966 |
se_78881661 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to chain AzureOpenAI in LangChain? | How to chain AzureOpenAI in LangChain?
from openai import AzureOpenAI
client = AzureOpenAI(
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"),
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
api_version="2024-05-01-preview"
)
normal_chain = (
ChatPromptTemplate.from_messages([("system", "wr... | https://stackoverflow.com/questions/78881661/how-to-chain-azureopenai-in-langchain | python, azure, openai-api, langchain | 1,723,881,047 |
se_78892056 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to disable the warning message for g4f version deprecation? | How to disable the warning message for g4f version deprecation?
I am using this code to get my response out of the model :
from g4f.client import Client
client = Client()
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Hello"}],
)
This code is run thr... | https://stackoverflow.com/questions/78892056/how-to-disable-the-warning-message-for-g4f-version-deprecation | python, warnings, openai-api | 1,724,151,709 |
se_78905827 | stackoverflow | ARTIFICIAL_INTELLIGENCE | I get Error TypeError: Cannot read properties of undefined (reading 'key') | I get Error TypeError: Cannot read properties of undefined (reading 'key')
I'm experiencing a couple of issues with configuring and using OpenAI in a Firebase function.
When trying to access the OpenAI API key in the openaiConfig.ts file, I get the error:
TypeError: Cannot read properties of undefined (reading... | https://stackoverflow.com/questions/78905827/i-get-error-typeerror-cannot-read-properties-of-undefined-reading-key | node.js, firebase, function, google-cloud-functions, openai-api | 1,724,415,000 |
se_78905188 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why am I not seeing any return results for my firestore vector embedding search? | Why am I not seeing any return results for my firestore vector embedding search?
I have made a composite index as per the firebase docs
gcloud alpha firestore indexes composite create \
--project=[Insert Project Name Here]
--collection-group=elements --query-scope=COLLECTION \
--field-config=vector-config='{"dimensio... | https://stackoverflow.com/questions/78905188/why-am-i-not-seeing-any-return-results-for-my-firestore-vector-embedding-search | node.js, google-cloud-firestore, vector, openai-api, word-embedding | 1,724,404,906 |
se_78901998 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How does OpenAIEmbeddings() work? Is it creating a single vector of size 1536 for whole text corpus? | How does OpenAIEmbeddings() work? Is it creating a single vector of size 1536 for whole text corpus?
I'm working with the OpenAIEmbeddings() class from OpenAI, which uses the text-embedding-3-small model. According to the documentation, it generates a 1536-dimensional vector for any input text.
However, I'm a bit conf... | https://stackoverflow.com/questions/78901998/how-does-openaiembeddings-work-is-it-creating-a-single-vector-of-size-1536-fo | deep-learning, nlp, openai-api, openaiembeddings | 1,724,335,765 |
se_76870837 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to delete documents in LangChain vectorstore | How to delete documents in LangChain vectorstore
I am following LangChain's tutorial to create an example selector to automatically select similar examples given an input.
example_selector = SemanticSimilarityExampleSelector.from_examples(
# This is the list of examples available to select from.
examples,
... | https://stackoverflow.com/questions/76870837/how-to-delete-documents-in-langchain-vectorstore | python, openai-api, langchain, azure-openai, chromadb | 1,691,610,462 |
se_78896401 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Azure open AI while developing python script using api key getting error | Azure open AI while developing python script using api key getting error
import openai
# Setup
openai.api_key = 'xxxxxxxxxxxxxxxxxxxxxx'
openai.api_base = "xxxxxxxxxxxxxxxxxxxxxx"
openai.api_version = '2024-08-20' # Ensure this is correct
def test_openai():
try:
response = openai.Image.create(
... | https://stackoverflow.com/questions/78896401/azure-open-ai-while-developing-python-script-using-api-key-getting-error | python, azure, openai-api, azure-openai | 1,724,235,660 |
se_76511924 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Module openai has no attribute of embed | Module openai has no attribute of embed
import openai
openai.api_key = "YOUR_API_KEY"
text = "This is the text for which you want to create an embedding."
response = openai.Embed.create(engine="text-davinci-002", text=text)
embedding = response["embedding"]
Im trying to create a embedding for a text. but it says 'm... | https://stackoverflow.com/questions/76511924/module-openai-has-no-attribute-of-embed | vectorization, embedding, openai-api | 1,687,242,841 |
se_78888382 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to use ChatOpenAI with LM Studio for LLMs? (Langchain) | How to use ChatOpenAI with LM Studio for LLMs? (Langchain)
I want to use ChatOpenAI from langchain-openai package to communicate with my local LM Studio server on Ubuntu 22.
I followed docs and came up with this - which is a standard way:
from langchain_openai import ChatOpenAI
from dotenv import load_dotenv
load_dot... | https://stackoverflow.com/questions/78888382/how-to-use-chatopenai-with-lm-studio-for-llms-langchain | python, openai-api, langchain, agent | 1,724,077,517 |
se_78891691 | stackoverflow | ARTIFICIAL_INTELLIGENCE | chroma Insufficient budget available (open AI ) | chroma Insufficient budget available (open AI )
Runing this code and getting this error...
db = Chroma.from_documents(split_docs, OpenAIEmbeddings(), persist_directory=CHROMA_PATH)
ile ~/miniconda3/envs/rag/lib/python3.10/site-packages/openai/_base_client.py:1041, in SyncAPIClient._request(self, cast_to, options, rema... | https://stackoverflow.com/questions/78891691/chroma-insufficient-budget-available-open-ai | openai-api, chromadb, faiss | 1,724,146,870 |
se_78333023 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I speed up response using stream on python | How can I speed up response using stream on python
@app.route('/gpt/chat', methods=['POST'])
def chat():
data = request.json
thread_id = data.get('thread_id')
announcement_id = data.get('announcement_id')
message = data.get('message')
if not thread_id:
return jsonify({"error": "thread_id i... | https://stackoverflow.com/questions/78333023/how-can-i-speed-up-response-using-stream-on-python | python, openai-api | 1,713,254,633 |
se_76544093 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do you get the context window of Open AI models? | How do you get the context window of Open AI models?
Is there a specific API call to get the context window of each model open ai offers?
I have printed out openai.Models.list() and there isn't any context window member in the json spit out. | https://stackoverflow.com/questions/76544093/how-do-you-get-the-context-window-of-open-ai-models | openai-api | 1,687,566,079 |
se_78847255 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Issue with JSON Extraction: GPT-3.5 Turbo vs. GPT-4 o-Mini Module | Issue with JSON Extraction: GPT-3.5 Turbo vs. GPT-4 o-Mini Module
I'm facing a challenge with extracting JSON data from files using different AI models and could use some help.
Problem Description:
When I provide file content to ChatGPT 3.5 Turbo, I receive a complete JSON output. However, when using the GPT-4 o-Mini ... | https://stackoverflow.com/questions/78847255/issue-with-json-extraction-gpt-3-5-turbo-vs-gpt-4-o-mini-module | token, openai-api, chatgpt-api, gpt-4o-mini | 1,723,104,978 |
se_76288648 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why I got this error: POST https://api.openai.com/v1/chat/completions 400? | Why I got this error: POST https://api.openai.com/v1/chat/completions 400?
Here is my code:
export async function getStructuredMessage(messageText) {
const response = await fetch('https://api.openai.com/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json... | https://stackoverflow.com/questions/76288648/why-i-got-this-error-post-https-api-openai-com-v1-chat-completions-400 | json, openai-api, chatgpt-api | 1,684,495,950 |
se_78767515 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to use WASM Tiktoken in React Webpack JS | How to use WASM Tiktoken in React Webpack JS
The build issues due to wasm instantiate or wasm not being imported.
wasm.__wbindgen_add_to_stack_pointer is not a function | https://stackoverflow.com/questions/78767515/how-to-use-wasm-tiktoken-in-react-webpack-js | reactjs, openai-api, langchain-js | 1,721,362,546 |
se_78882349 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Azure OpenAI Ingesion Job API returns 404 Resource not found | Azure OpenAI Ingesion Job API returns 404 Resource not found
Im following the documentation from Azure on the ingestion job API here: https://learn.microsoft.com/en-us/rest/api/azureopenai/ingestion-jobs/create?view=rest-azureopenai-2024-07-01-preview&tabs=HTTP
No matter the body of my request or the api-key in the re... | https://stackoverflow.com/questions/78882349/azure-openai-ingesion-job-api-returns-404-resource-not-found | azure, openai-api, azure-openai | 1,723,901,529 |
se_78885166 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LangChain failure with long input texts | LangChain failure with long input texts
I am working with LangChain's LLMChain to process large documents. I see quite some problems when the input text exceeds the token limit of the language model. For long input text, it has significant slowdowns and can even sometimes fail due to overflow of tokens.
This is the sa... | https://stackoverflow.com/questions/78885166/langchain-failure-with-long-input-texts | python, openai-api, langchain, large-language-model, chatgpt-api | 1,723,999,560 |
se_76284509 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to upload files with the OpenAI API | How to upload files with the OpenAI API
In order to make a fine-tuned ChatGPT model, we need to upload a JSON file of training data. The OpenAI doc for file upload is here:
https://platform.openai.com/docs/api-reference/files/upload
But... I don't see how to append the actual file information. The file parameter is ... | https://stackoverflow.com/questions/76284509/how-to-upload-files-with-the-openai-api | openai-api, chatgpt-api | 1,684,444,144 |
se_78670823 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Endpoint returning 403 after successfully executing (Spring Boot) | Endpoint returning 403 after successfully executing (Spring Boot)
I made an endpoint "/api/chat" that, when called, makes another request to the OpenAI API (paid for and API key valid, all that). When testing the endpoint in Postman, I first request my /auth/login endpoint to get a valid JWT login token, copy that for... | https://stackoverflow.com/questions/78670823/endpoint-returning-403-after-successfully-executing-spring-boot | java, spring, spring-boot, openai-api, http-status-code-403 | 1,719,386,114 |
se_78823510 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Formatting OpenAI responses | Formatting OpenAI responses
I've created an OpenAI-powered platform for teachers in my district to create AI Bots that have thematic chats with students (i.e. why is socialism so polarizing in the US, etc). These chats are saved in a database, and a teacher can run queries against the dataset to gain macro-level insig... | https://stackoverflow.com/questions/78823510/formatting-openai-responses | php, response, openai-api, guzzle | 1,722,562,484 |
se_77654726 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Is there any way of providing Audio answer as stream with ChatGPT in Flutter? | Is there any way of providing Audio answer as stream with ChatGPT in Flutter?
I want to get answer from ChatGPT and provide answer as audio in Flutter.
When I look through document of ChatGPT API, I found text to speech.
https://platform.openai.com/docs/guides/text-to-speech
But this speaks input itself, not answer fr... | https://stackoverflow.com/questions/77654726/is-there-any-way-of-providing-audio-answer-as-stream-with-chatgpt-in-flutter | flutter, openai-api, chatgpt-api | 1,702,481,235 |
se_71151195 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Can't import openai in Node | Can't import openai in Node
I have Node 16.13.1 installed and I installed openai globally with 'npm install -g openai'.
I imported the packages inside my script using:
const { Configuration, OpenAIApi } = require('openai')
However, when I ran my script, I got this error:
PS D:\Projects\OpenAI-Chat> node conversat... | https://stackoverflow.com/questions/71151195/cant-import-openai-in-node | javascript, node.js, npm, openai-api | 1,645,059,566 |
se_76481857 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Integration of TinyMCE editor and ChatGPT | Integration of TinyMCE editor and ChatGPT
I'm trying to integrate TunyMCE editor with ChatGPT so I can use some OpenAI features. I was trying to implement this example: https://www.tiny.cloud/blog/chatgpt-integration/, but I always get error 429: Error 429
I tried running this example from this tutorial: https://codep... | https://stackoverflow.com/questions/76481857/integration-of-tinymce-editor-and-chatgpt | tinymce, openai-api, chatgpt-api, tinymce-6 | 1,686,827,353 |
se_78873680 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to create a function call tool to analyse CSV in LLM Long-chain with all columns definition predefined | How to create a function call tool to analyse CSV in LLM Long-chain with all columns definition predefined
Context
I would like to create an GPT Agent. This Agent should be able to fetch data from 3 predefined CSV files. Hence I would like to create 3 function tools for each CSV file.
Expectation
AI Agent should under... | https://stackoverflow.com/questions/78873680/how-to-create-a-function-call-tool-to-analyse-csv-in-llm-long-chain-with-all-col | python, openai-api, langchain, large-language-model, gpt-4 | 1,723,697,711 |
se_78872616 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to save information from an async request and use it in another async request after an event is triggered? | How to save information from an async request and use it in another async request after an event is triggered?
Part of a game I am making requires a query to gpt-4o asking whether two people have met. An inital person is provided and the user has to input the name of someone who they think has met the initial person. ... | https://stackoverflow.com/questions/78872616/how-to-save-information-from-an-async-request-and-use-it-in-another-async-reques | javascript, reactjs, asynchronous, promise, openai-api | 1,723,663,098 |
se_78840533 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to parse answer ( content ) from openai response to markdown format? | How to parse answer ( content ) from openai response to markdown format?
I have a Next.js action that uses OpenAI to generate an answer :
export async function continueConversation(
messages: CoreMessage[],
data: PersonResponse,
prompt: string
) {
const { full_name, job_title, ...rest } = data
const result =... | https://stackoverflow.com/questions/78840533/how-to-parse-answer-content-from-openai-response-to-markdown-format | reactjs, next.js, openai-api | 1,722,968,601 |
se_78870005 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to input multiple inputs in RunnableWithMessageHistory of LangChain? | How to input multiple inputs in RunnableWithMessageHistory of LangChain?
I would like to ask about LangChain for LLM in python.
I need multiple inputs with chatting history to run the model, so I tried to use RunnableWithMessageHistory but got an error.
Error in RootListenersTracer.on_chain_end callback: KeyError('in... | https://stackoverflow.com/questions/78870005/how-to-input-multiple-inputs-in-runnablewithmessagehistory-of-langchain | python, openai-api, langchain | 1,723,625,989 |
se_78868340 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API key with "proj-" prefix not working when read from .env file | OpenAI API key with "proj-" prefix not working when read from .env file
I'm working on a Next.js/React/TypeScript project that integrates with the OpenAI API. I've encountered an issue with the new Project-based API keys feature.
Previously, I successfully used this setup:
const openai = new OpenAI({
apiKe... | https://stackoverflow.com/questions/78868340/openai-api-key-with-proj-prefix-not-working-when-read-from-env-file | javascript, node.js, typescript, next.js, openai-api | 1,723,583,635 |
se_78864115 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AuthenticationError 401 - Principal Does Not Have Access to API/Operation when using Azure Open AI with Python SDK | AuthenticationError 401 - Principal Does Not Have Access to API/Operation when using Azure Open AI with Python SDK
Issue Summary:
Encountering an AuthenticationError with error code 401 when attempting to access the OpenAI API. The error message indicates that the principal does not have access to the API/Operation.
E... | https://stackoverflow.com/questions/78864115/authenticationerror-401-principal-does-not-have-access-to-api-operation-when-u | azure, openai-api, azure-openai, microsoft-entra-id | 1,723,514,365 |
se_76344857 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI Dalle Node createImageEdit 400 Error | OpenAI Dalle Node createImageEdit 400 Error
I am trying to use the OpenAI package in Node to send an edit request as follows:
let response = await openai.createImageEdit(
fs.createReadStream('assets/cute_cat.png'),
fs.createReadStream('assets/mask.png'),
'a cat with a hat',
1,
'512x512'
);
statusCode: 400,
... | https://stackoverflow.com/questions/76344857/openai-dalle-node-createimageedit-400-error | node.js, openai-api | 1,685,146,509 |
se_76923237 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Keep getting 400 Invalid File Form error from Whisper API | Keep getting 400 Invalid File Form error from Whisper API
I am trying to call Whisper API from my android app. I am recording the audio and storing in .wav format. when I am calling the whisper API it always gives me 400 error saying "invalid file format".
I tried playing the audio back and its working, and the file i... | https://stackoverflow.com/questions/76923237/keep-getting-400-invalid-file-form-error-from-whisper-api | java, android, openai-api, openai-whisper | 1,692,288,224 |
se_77190456 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI Whisper cannot handle past a few seconds of IOS recording | OpenAI Whisper cannot handle past a few seconds of IOS recording
I am sending audio recordings to the OpenAI Whisper API and cannot get mobile recordings to accept more than a few seconds of data. Desktop audio recordings function perfectly fine but whenever I try on my phone the transcriptions only get a word or two.... | https://stackoverflow.com/questions/77190456/openai-whisper-cannot-handle-past-a-few-seconds-of-ios-recording | openai-api, speech-to-text, openai-whisper | 1,695,843,849 |
se_77219088 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Speech to text with OpenAI Whisper in Unity acts weird on Android phone | Speech to text with OpenAI Whisper in Unity acts weird on Android phone
I am testing 'Speech to text' provided by OpenAI Whisper. It works perfectly fine in Unity Editor, but acts weird on Android phone. It consistently shows wrong text I didn't utter. For example, I say 'hello there?' and AI shows 'Okay'. Not even cl... | https://stackoverflow.com/questions/77219088/speech-to-text-with-openai-whisper-in-unity-acts-weird-on-android-phone | unity-game-engine, text-to-speech, openai-api, openai-whisper | 1,696,293,242 |
se_77247731 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Retrieving Word Timestamps with OpenAI's Whisper API? | Retrieving Word Timestamps with OpenAI's Whisper API?
I am currently exploring OpenAI's Whisper API and have been trying to extract specific information from the audio recognition results. Specifically, I'm interested in obtaining word timestamps alongside the transcribed text.
When utilizing the local Whisper mod... | https://stackoverflow.com/questions/77247731/retrieving-word-timestamps-with-openais-whisper-api | openai-api, openai-whisper | 1,696,633,850 |
se_77293859 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Speechmatics - Getting API key error after I add some configurations | Speechmatics - Getting API key error after I add some configurations
My code runs for the simple configuration below:
from speechmatics.models import ConnectionSettings
from speechmatics.batch_client import BatchClient
from httpx import HTTPStatusError
AUTH_TOKEN = "YOUR_API_KEY"
PATH_TO_FILE = "example.wav"
LANGUAG... | https://stackoverflow.com/questions/77293859/speechmatics-getting-api-key-error-after-i-add-some-configurations | python, artificial-intelligence, openai-api, openai-whisper | 1,697,304,862 |
se_77684178 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI whisper medium WER does not decay for low resource language | OpenAI whisper medium WER does not decay for low resource language
Does anyone know why the WER does not decay? I'm trying to finetune the OpenAI Whisper medium model for low resource language.
I'm using the following parameters:
per_device_train_batch_size="32"
per_device_eval_batch_size="16"
learning_rate="1e-5" | https://stackoverflow.com/questions/77684178/openai-whisper-medium-wer-does-not-decay-for-low-resource-language | openai-api, openai-whisper | 1,702,978,628 |
se_77707434 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to use ZLUDA for whisper? | How to use ZLUDA for whisper?
i'm trying to use Whisper from OpenAI with ZLUDA. (to run whisper on intel GPU condition).
I've installed ZLUDA and GEEKBENCH6 already, and this manual suggests that I run
zluda_with -- geekbench5 --compute CUDA
Unfortunately, it doesn't work after I typed above command on powershell.
My... | https://stackoverflow.com/questions/77707434/how-to-use-zluda-for-whisper | gpu, intel, openai-api, openai-whisper | 1,703,330,198 |
se_78067825 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Sending axios request to Whisper endpoint with file input in client-side JS | Sending axios request to Whisper endpoint with file input in client-side JS
I have a working NodeJS code that makes a request to /audio/transcriptions endpoint on a localhosted OpenAI API.
The file is given as fs.createReadStream("speech.m4a").
The node application works perfectly as it should, giving output: {text: "... | https://stackoverflow.com/questions/78067825/sending-axios-request-to-whisper-endpoint-with-file-input-in-client-side-js | node.js, axios, client, openai-api, openai-whisper | 1,709,039,611 |
se_78172267 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to solve AttributeError: 'Audio' object has no attribute 'transcribe'? | How to solve AttributeError: 'Audio' object has no attribute 'transcribe'?
I am trying to do a voice recognition bot.
I wrote following code:
app.py
from dotenv import load_dotenv
import os
load_dotenv()
from interface import AudioInterface
interface=AudioInterface()
text=interface.listen()
print(text)... | https://stackoverflow.com/questions/78172267/how-to-solve-attributeerror-audio-object-has-no-attribute-transcribe | openai-api, voice, openai-whisper, elevenlabs | 1,710,601,738 |
se_76989777 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Next.js error TypeError: Cannot read properties of undefined (reading 'headers') | Next.js error TypeError: Cannot read properties of undefined (reading 'headers')
I am working with Next.js 13.4.19 and I want to try OpenAI API. I have my API routes in good structure. When I hit the API route http://localhost:3000/api/course/createChapters for POST with:
{
'title':'calculus',
'units'... | https://stackoverflow.com/questions/76989777/next-js-error-typeerror-cannot-read-properties-of-undefined-reading-headers | rest, openai-api, next.js13, insomnia | 1,693,190,759 |
se_78852810 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Nextjs Pages router - OpenAI GPT assistant not receiving output | Nextjs Pages router - OpenAI GPT assistant not receiving output
I'm working on a codebase that uses the Next.js Pages Router. However, I can't seem to find any documentation supporting the use of the useAssistant hook from the Vercel ai/sdk with the Pages Router. I understand that it's recommended to use the App Route... | https://stackoverflow.com/questions/78852810/nextjs-pages-router-openai-gpt-assistant-not-receiving-output | next.js, openai-api, chatgpt-api | 1,723,206,986 |
se_78852760 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Getting HTTP Status code 429 while hitting OpenAI LLM API | Getting HTTP Status code 429 while hitting OpenAI LLM API
I am using Langchain 0.2 to create a conversation pipeline with OpenAI LLM. Following is the code that I have written:
chat_llm = ChatOpenAI(
model_name="gpt-4",
api_key=config\["api_key"\],
openai_api_base=platform_url,
default_headers=llm_headers,
)
history_... | https://stackoverflow.com/questions/78852760/getting-http-status-code-429-while-hitting-openai-llm-api | python, openai-api, langchain, large-language-model, py-langchain | 1,723,206,397 |
se_76553580 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to embed additional strings into prompt with PromptTemplate? | How to embed additional strings into prompt with PromptTemplate?
I would like to use PromptTemplate and ConversationChain to embed what I have previously saved in the prompt.
llm = OpenAI(temperature=0)
memory = ConversationBufferMemory(human_prefix="ユーザー", memory_key="chat_history")
prompt = PromptTemplate(
input_v... | https://stackoverflow.com/questions/76553580/how-to-embed-additional-strings-into-prompt-with-prompttemplate | python, openai-api, langchain | 1,687,754,660 |
se_77362103 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to Convert openai functions to PromptTemplate in langchain when using local llms? | How to Convert openai functions to PromptTemplate in langchain when using local llms?
Is is possible to Convert openai functions to PromptTemplate in langchain when using local llms and return final output similar to openai api function format
import langchain
functions = [
{
"name": "get_current_w... | https://stackoverflow.com/questions/77362103/how-to-convert-openai-functions-to-prompttemplate-in-langchain-when-using-local | python, openai-api, large-language-model, py-langchain | 1,698,258,834 |
se_78557135 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I print each element in an openai ChatCompletion response as JSON on a separate line? | How do I print each element in an openai ChatCompletion response as JSON on a separate line?
I'm making a simple call to OpenAI using Python asking about where a baseball game was played.
completion = openai.chat.completions.create(
model="gpt-3.5-turbo",
messages = [
{"role": "system", "content": "You are a hel... | https://stackoverflow.com/questions/78557135/how-do-i-print-each-element-in-an-openai-chatcompletion-response-as-json-on-a-se | python, json, openai-api, pretty-print | 1,717,100,948 |
se_76394423 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Do I need any environment variables set to execute some code, call openai's api, and return a response? | Do I need any environment variables set to execute some code, call openai's api, and return a response?
I was going through a course in OpenAI's API using an in-browser jupyter notebook page but wanted to copy some example code from there into a local IDE. I installed Python and the jupyter extention in VS Code an... | https://stackoverflow.com/questions/76394423/do-i-need-any-environment-variables-set-to-execute-some-code-call-openais-api | python, openai-api, dotenv | 1,685,762,235 |
se_78841390 | stackoverflow | ARTIFICIAL_INTELLIGENCE | VS code not recognizing OpenAI API environmental variable | VS code not recognizing OpenAI API environmental variable
import dotenv from "dotenv";
dotenv.config();
console.log("OPENAI_API_KEY:", process.env.OPENAI_API_KEY); // this line to debug
import openaiPkg from "openai";
const openaiApiKey = process.env.OPENAI_API_KEY; //
const { Configuration, OpenAIApi } = openaiP... | https://stackoverflow.com/questions/78841390/vs-code-not-recognizing-openai-api-environmental-variable | node.js, environment-variables, openai-api, api-key | 1,722,988,552 |
se_78837277 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ResourceNotFound error when connecting to Azure OpenAI using latest JavaScript SDK (version 2.0.0-beta.1) | ResourceNotFound error when connecting to Azure OpenAI using latest JavaScript SDK (version 2.0.0-beta.1)
I am trying to connect to Azure OpenAI using the latest version of SDK (version 2.0.0-beta.1) but no matter what I do, I am getting Resource not found error). When I use the previous version (1.0.0-beta.12) of the... | https://stackoverflow.com/questions/78837277/resourcenotfound-error-when-connecting-to-azure-openai-using-latest-javascript-s | typescript, azure, openai-api, azure-openai | 1,722,919,259 |
se_76288626 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How set meta description for Yoast SEO plugin from Open AI in WordPress | How set meta description for Yoast SEO plugin from Open AI in WordPress
I have recently developed a WordPress plugin that utilizes Open AI to generate descriptions and other data for products. One of the challenges I'm facing is integrating the generated meta descriptions into the Yoast SEO plugin.
I am looking for gu... | https://stackoverflow.com/questions/76288626/how-set-meta-description-for-yoast-seo-plugin-from-open-ai-in-wordpress | wordpress, openai-api, yoast | 1,684,495,773 |
se_76154305 | stackoverflow | ARTIFICIAL_INTELLIGENCE | You exceeded your current quota, please check your plan and billing details with new ChatGPT account? | You exceeded your current quota, please check your plan and billing details with new ChatGPT account?
a Few days back, I created an account with chat gpt. Now I have tried api the first time but it's giving me an error; my quota has finished. but I have not used it. even in the usage section, it's telling 0 calls so f... | https://stackoverflow.com/questions/76154305/you-exceeded-your-current-quota-please-check-your-plan-and-billing-details-with | openai-api, chatgpt-api | 1,683,026,153 |
se_78835827 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Seeking Assistance on Achieving Determinism in OpenAI GPT-4 Models | Seeking Assistance on Achieving Determinism in OpenAI GPT-4 Models
I’m currently working on a project that requires generating 100% reproducible outputs from OpenAI’s GPT-4 model for the same input prompt. Despite experimenting with various parameters like temperature, top_p, max_tokens, and setting a seed, I have not... | https://stackoverflow.com/questions/78835827/seeking-assistance-on-achieving-determinism-in-openai-gpt-4-models | openai-api, non-deterministic | 1,722,880,625 |
se_78609056 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI Assistants API: How do I pass the assistant to the API? | OpenAI Assistants API: How do I pass the assistant to the API?
I am trying to pass my assistant to the OpenAI Assistants API, but I get the following error when doing so:
message: 'The model my Model ID does not exist or you do not have
access to it.',
type: 'invalid_request_error',
param: null,
code: 'model_not_foun... | https://stackoverflow.com/questions/78609056/openai-assistants-api-how-do-i-pass-the-assistant-to-the-api | javascript, openai-api, openai-assistants-api | 1,718,127,863 |
se_78809296 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Nginx worker fails to boot flask app on Elasticbeanstalk after installing OpenAI | Nginx worker fails to boot flask app on Elasticbeanstalk after installing OpenAI
Environment: Flask app running on python3.8 with AWS ElasticBeanstalk on an AL2 EC2 instance. After installing the OpenAI python package, there is an error in the EB instance on boot with the following error in the logs:
from openai impo... | https://stackoverflow.com/questions/78809296/nginx-worker-fails-to-boot-flask-app-on-elasticbeanstalk-after-installing-openai | python, flask, amazon-ec2, amazon-elastic-beanstalk, openai-api | 1,722,294,735 |
se_78832109 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to get stream response from open ai in next js 13 app | How to get stream response from open ai in next js 13 app
I want to get valid response in form of stream from open ai in to my next js version 13 app and render it on the screen
Here is what I did in my sendMessage.js
export default async function handler(req) {
try {
const { message } = await req.json();
co... | https://stackoverflow.com/questions/78832109/how-to-get-stream-response-from-open-ai-in-next-js-13-app | deployment, next.js13, openai-api | 1,722,805,240 |
se_78827379 | stackoverflow | ARTIFICIAL_INTELLIGENCE | What is the max_tokens number I can put for OpenAI GPT generate function? | What is the max_tokens number I can put for OpenAI GPT generate function?
I've tried to use 100_000, 20_000 but seems like only 10_000 is possible:
from openai import OpenAI
client = OpenAI()
messages = {"role": "user", "content": "Hello"}
completion = client.chat.completions.create(
model="gpt-4o-mini", mes... | https://stackoverflow.com/questions/78827379/what-is-the-max-tokens-number-i-can-put-for-openai-gpt-generate-function | python, openai-api, large-language-model, gpt-4o-mini | 1,722,636,570 |
se_76359137 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I allocate chat memory to the openai model | How can I allocate chat memory to the openai model
I'm working in django, I have a view where I call the openai api, and in the frontend I work with react, where I have a chatbot, I want the model to have a record of the data, like the chatgpt page does.
class chatbot(APIView):
def post(self, request):
ch... | https://stackoverflow.com/questions/76359137/how-can-i-allocate-chat-memory-to-the-openai-model | python, reactjs, django, openai-api | 1,685,379,745 |
se_77670321 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langchain | Qdrant | TimeOutError: The write operation timeout | Langchain | Qdrant | TimeOutError: The write operation timeout
embeddings = OpenAIEmbeddings(openai_api_key=settings.OPENAI_API_KEY,headers=headers)
db = Qdrant.from_documents(
documents=documents,
embedding=embeddings,
collection_name=collection_name,
url=settings.QDRANT_CONNECTION_STRING,
for... | https://stackoverflow.com/questions/77670321/langchain-qdrant-timeouterror-the-write-operation-timeout | python, openai-api, langchain, openaiembeddings, qdrant | 1,702,716,663 |
se_78411267 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langchain RAG with history and citations | Langchain RAG with history and citations
I'm trying to build a RAG with langchain. I'd like to consider the chat history and to be able to produce citations. I've followed the tutorial on Langchain but I struggle to put together history and citations.
Here my code:
### Contextualize question ### This is used to foruml... | https://stackoverflow.com/questions/78411267/langchain-rag-with-history-and-citations | python, openai-api, langchain | 1,714,515,916 |
se_78509249 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Get a SSL Certificate Error while calling OPENAI Api to run a few agents | Get a SSL Certificate Error while calling OPENAI Api to run a few agents
Executing a CrewAI Agent call to OpenAI:
result = crew.kickoff(inputs={"topic": "Artificial Intelligence"})
from IPython.display import Markdown
Markdown(result)
I get a
APIConnectionError: Connection error
with a number of underlying SSL Cer... | https://stackoverflow.com/questions/78509249/get-a-ssl-certificate-error-while-calling-openai-api-to-run-a-few-agents | python, ssl-certificate, jupyter, openai-api | 1,716,252,349 |
se_78818687 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why does not work the await fetch to the API function? | Why does not work the await fetch to the API function?
I'm creating a AI chat using OpenAI API, i following this tutorial but the thing is when i made the call to the api/chat/sendMessage.js i get the 404 error, idk what to do, i made several OpenAI keys and still not working, here is te code in sendMessage.js
import ... | https://stackoverflow.com/questions/78818687/why-does-not-work-the-await-fetch-to-the-api-function | javascript, json, openai-api | 1,722,471,202 |
se_78813531 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Failed to load resource: the server responded with a status of 504 () - chatGPT API | Failed to load resource: the server responded with a status of 504 () - chatGPT API
I am working on angular project with node js. my method works fine locally but not working on the domain.
my website deployed on vercel.
vercel has this file vercel.json to config it before deploy
this is the method that uses chatGPT
r... | https://stackoverflow.com/questions/78813531/failed-to-load-resource-the-server-responded-with-a-status-of-504-chatgpt | node.js, angular, mongodb, vercel, openai-api | 1,722,370,550 |
se_78815849 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Azure Openai Whipser REST endpoints | Azure Openai Whipser REST endpoints
I wanted to use Whisper deployed through Azure OpenAI but I am having trouble finding the right resources for it.
I am trying to integrate a translator using Whisper in a flutter app that will take multilingual input and give out the output in english.
Right now the transcription is... | https://stackoverflow.com/questions/78815849/azure-openai-whipser-rest-endpoints | azure, rest, openai-api, openai-whisper | 1,722,422,497 |
se_78785646 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I view all the uploaded files associated with an Azure OpenAI assistant in Python? | How can I view all the uploaded files associated with an Azure OpenAI assistant in Python?
I’m using Python to benchmark questions from documents and have instantiated my assistant in a jupyter notebook. I’d like to confirm the assistant has the files I uploaded to it but can’t seem to find documentation on what funct... | https://stackoverflow.com/questions/78785646/how-can-i-view-all-the-uploaded-files-associated-with-an-azure-openai-assistant | python, azure, file, openai-api, assistant | 1,721,770,196 |
se_77168202 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Calculating total tokens for API request to ChatGPT including functions | Calculating total tokens for API request to ChatGPT including functions
Hello Stack Overflow community,
I've been working on integrating ChatGPT's API into my project, and I'm having some trouble calculating the total number of tokens for my API requests. Specifically, I'm passing both messages and functions in my API... | https://stackoverflow.com/questions/77168202/calculating-total-tokens-for-api-request-to-chatgpt-including-functions | python, tokenize, openai-api | 1,695,576,642 |
se_77428241 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to connect my ChromaDB collection and using langchain | How to connect my ChromaDB collection and using langchain
I just have a question for connect ChromaDB with langchain
Already tested chromadb and langchain using from_documents
But using Chroma.from_documents function that is always an embedding cost, right?
So I'm Already have embedding data So
When I receive request ... | https://stackoverflow.com/questions/77428241/how-to-connect-my-chromadb-collection-and-using-langchain | vector, openai-api, embedding, langchain, chromadb | 1,699,232,713 |
se_78288681 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Using ChatGPT4 Vision in ASP.NET Core | Using ChatGPT4 Vision in ASP.NET Core
I am working on a web application with openai integration. I have the standard chat prompt and response implemented, but I am having issues accessing the vision api. All of the examples I can find are in python. I whipped up quick Jupyter Notebook and called the vision model with ... | https://stackoverflow.com/questions/78288681/using-chatgpt4-vision-in-asp-net-core | c#, asp.net-core, openai-api, chat-gpt-4 | 1,712,510,751 |
se_78802377 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Calculation of pricing of tokens in OPENAI calls | Calculation of pricing of tokens in OPENAI calls
I'm trying to price the tokens used in a call to OPENAI. I have a txt file with plain text that was uploaded to Qdrant. When I ask the following question:
Who is Michael Jordan?
and use the get_openai_callback function to track the number of tokens and the price of the ... | https://stackoverflow.com/questions/78802377/calculation-of-pricing-of-tokens-in-openai-calls | python, token, openai-api, langchain, qdrant | 1,722,111,536 |
se_78116725 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Next.js .env file not working (Next, openAI API, typescript) | Next.js .env file not working (Next, openAI API, typescript)
I am trying to use OpenAI's API. My code works great when I tested my API key directly in my code, but when I tried moving it to a .env file, it stopped working. I've been trying to figure out what the issue is but cannot figure it out.
Here is my code:
impo... | https://stackoverflow.com/questions/78116725/next-js-env-file-not-working-next-openai-api-typescript | typescript, next.js, environment-variables, openai-api | 1,709,750,657 |
se_78593083 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to prevent data stream hanging on stop? (Next.JS - Open AI API - Vercel AI SDK) | How to prevent data stream hanging on stop? (Next.JS - Open AI API - Vercel AI SDK)
I'm using Next.JS V14 (App router). I'm trying to implement a "stop" stream functionality using the Vercel AI SDK useChat() function, but i'm having some issues with it. For now, i'm receiving warnings in the terminal when i stop the s... | https://stackoverflow.com/questions/78593083/how-to-prevent-data-stream-hanging-on-stop-next-js-open-ai-api-vercel-ai-s | next.js, vercel, openai-api, nextjs14, vercel-ai | 1,717,777,698 |
se_78734965 | stackoverflow | ARTIFICIAL_INTELLIGENCE | The RAG chat applications using azure open ai models and embeddings not working properly | The RAG chat applications using azure open ai models and embeddings not working properly
I have been building a RAG chat application using Azure Open AI model (gpt-35-turbo) and azure embeddings (ada-embedding-002). Here I am providing the prompt templates and the RAG chain.
client = AzureChatOpenAI(
api_key ... | https://stackoverflow.com/questions/78734965/the-rag-chat-applications-using-azure-open-ai-models-and-embeddings-not-working | azure, openai-api, azure-openai, azure-ai | 1,720,693,721 |
se_78793654 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Unable to send a local image that isn't under wwwroot to openai using its new .NET library | Unable to send a local image that isn't under wwwroot to openai using its new .NET library
I have an ASP.NET Core 6 Web API with the new official library from OpenAI (https://github.com/openai/openai-dotnet).
What I'm trying to do, is to use a local image file to OpenAI. The file isn't under wwwroot, but under bac... | https://stackoverflow.com/questions/78793654/unable-to-send-a-local-image-that-isnt-under-wwwroot-to-openai-using-its-new-n | c#, asp.net-core-webapi, backend, .net-6.0, openai-api | 1,721,914,621 |
se_78788707 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AzureChatOpenAI only uses one tool at a time | AzureChatOpenAI only uses one tool at a time
LangChain with AzureChatOpenAI is only ever calling one tool at a time.
When prompting the model to multiply and add two sets of numbers, I expect two tool calls, however only one tool is called, without an obvious pattern which of the tools is called.
I'm following this ex... | https://stackoverflow.com/questions/78788707/azurechatopenai-only-uses-one-tool-at-a-time | python, openai-api, langchain, large-language-model, python-3.12 | 1,721,828,317 |
se_77556081 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to setup openai.createChatCompletion to return specific structured values via Prompt Engineering | How to setup openai.createChatCompletion to return specific structured values via Prompt Engineering
How to setup openai API such that it returns a structured output
I want to train with two three examples or give context to the API such that for a new prompt it returns in the below structure and with specific values
... | https://stackoverflow.com/questions/77556081/how-to-setup-openai-createchatcompletion-to-return-specific-structured-values-vi | openai-api, chatgpt-api | 1,701,080,053 |
se_78766967 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How Do I Pass Streaming Data from Nitro API to Pinia Store so I can use it in Nuxt Component? | How Do I Pass Streaming Data from Nitro API to Pinia Store so I can use it in Nuxt Component?
In my Nuxt app I have a Pinia store and am making an API call via the Nitro server that gets streaming data in response. When I try to update the Pinia store with the streaming data it does not update, i.e. I can call
const s... | https://stackoverflow.com/questions/78766967/how-do-i-pass-streaming-data-from-nitro-api-to-pinia-store-so-i-can-use-it-in-nu | vue.js, nuxt.js, openai-api, pinia, nitro | 1,721,344,004 |
se_77770620 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Continuous Increase in Memory Usage Issue in Langchain Utilization | Continuous Increase in Memory Usage Issue in Langchain Utilization
In my Flask application, I store my data using Langchain and Faiss. However, with each operation, memory usage increases and never decreases. I tested this with multiple vector databases, but memory usage consistently goes up. How can I solve this prob... | https://stackoverflow.com/questions/77770620/continuous-increase-in-memory-usage-issue-in-langchain-utilization | python, flask, chatbot, openai-api, langchain | 1,704,567,179 |
se_77976526 | stackoverflow | ARTIFICIAL_INTELLIGENCE | While using ragas evaluate method, I am getting ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] | While using ragas evaluate method, I am getting ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED]
for query in questions:
content,answer = rag_pipeline(query)
answers.append(answer)
contexts.append([content])
# To dict
data = {
"question": questions,
"answer": answers,
"contexts":... | https://stackoverflow.com/questions/77976526/while-using-ragas-evaluate-method-i-am-getting-ssl-sslcertverificationerror-s | python, openai-api | 1,707,649,350 |
se_78764560 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AzureOpenAI: Missing credentials of `api_key`, `azure_ad_token`, `azure_ad_token_provider` | AzureOpenAI: Missing credentials of `api_key`, `azure_ad_token`, `azure_ad_token_provider`
I'm trying to use the Azure OpenAI model to generate comments based on data from my BigQuery table in GCP using Cloud Functions. Here's the Python script I've been working on:
from azure_openai import AzureOpenAI
def generate_co... | https://stackoverflow.com/questions/78764560/azureopenai-missing-credentials-of-api-key-azure-ad-token-azure-ad-token | python, google-cloud-functions, openai-api, azure-openai | 1,721,307,370 |
se_78775926 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I fix my Flask server's 405 error that includes OpenAi api? | How can I fix my Flask server's 405 error that includes OpenAi api?
I'm trying to add an API to my webpage and have never used any Flask server before, I have never used Javascript too so this is a completely brand new learning experience.
My problem is that I keep receiving a 405 error code saying that the method... | https://stackoverflow.com/questions/78775926/how-can-i-fix-my-flask-servers-405-error-that-includes-openai-api | javascript, python, flask, openai-api | 1,721,583,644 |
se_78776267 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Blocking OpenAI Requests | Blocking OpenAI Requests
After multiple attempts at this myself along with numerous ChatGPT and Claude queries, I am throwing my hands up and asking StackOverflow what would seem to be an easy question:
How does one block OpenAI, at the global level, from making HTTP requests when testing using pytest?
Things I have t... | https://stackoverflow.com/questions/78776267/blocking-openai-requests | python, unit-testing, openai-api, azure-openai | 1,721,592,636 |
se_77941413 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Analyze long documents with OpenAI Assistant | Analyze long documents with OpenAI Assistant
I hope everyone's doing good.
I am currently using OpenAI's assistant to process documents and extract relevant information from them. The documents are long (about 45 pages, 44k words approximately). I am going to integrate this into a web app for users to use. I have some... | https://stackoverflow.com/questions/77941413/analyze-long-documents-with-openai-assistant | python, openai-api | 1,707,140,900 |
se_78751682 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to get multimodal embeddings from CLIP model? | How to get multimodal embeddings from CLIP model?
I'm hoping to use CLIP to get a single embedding for rows of multimodal (image and text) data.
Say I have the following model:
from PIL import Image
import torch
from transformers import CLIPProcessor, CLIPModel
import torchvision.transforms as transforms
model = CLIP... | https://stackoverflow.com/questions/78751682/how-to-get-multimodal-embeddings-from-clip-model | machine-learning, conv-neural-network, openai-api, large-language-model, word-embedding | 1,721,073,198 |
se_78568527 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to send large videos to Gemini AI API 1.5 Pro for inference? | How to send large videos to Gemini AI API 1.5 Pro for inference?
I'm currently working with the Gemini AI API 1.5 Pro (latest version) and need to send large video files for inference. These videos are several hundred megabytes each (~700MB) but are within the API's constraints (e.g., less than 1 hour in length). I wa... | https://stackoverflow.com/questions/78568527/how-to-send-large-videos-to-gemini-ai-api-1-5-pro-for-inference | python, server, openai-api, google-gemini | 1,717,392,421 |
se_77205725 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I upload an image as context with a prompt to GPT4's api? | How can I upload an image as context with a prompt to GPT4's api?
I see there are ways of doing various image generation here: https://platform.openai.com/docs/api-reference/images
But I'm just trying to sent chat gpt a png file, ask "what is this?" or something like that and then get back a response. | https://stackoverflow.com/questions/77205725/how-can-i-upload-an-image-as-context-with-a-prompt-to-gpt4s-api | openai-api, chatgpt-api, gpt-4, chat-gpt-4 | 1,696,049,892 |
se_78516046 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why do I get a "resource not found" error when switching resource groups for Azure OpenAI? | Why do I get a "resource not found" error when switching resource groups for Azure OpenAI?
When I use my second Resource Group in West US (my first one is Germany), I always get the following error:
Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
My Python code:
from openai i... | https://stackoverflow.com/questions/78516046/why-do-i-get-a-resource-not-found-error-when-switching-resource-groups-for-azu | python, azure, openai-api, azure-openai | 1,716,364,499 |
se_77365901 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I fix the async call to OpenAI embeddings from Databricks? | How can I fix the async call to OpenAI embeddings from Databricks?
I am attempting to use the OpenAI Python package to get some embeddings for text classification.
The regular version currently works:
import openai
from openai.embeddings_utils import get_embedding
def add_embeddings(data:pd.DataFrame) -> pd.DataFrame... | https://stackoverflow.com/questions/77365901/how-can-i-fix-the-async-call-to-openai-embeddings-from-databricks | python, asynchronous, databricks, openai-api | 1,698,313,677 |
se_78765929 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why llm_chain.invoke(ques_VN) output is interrupted when it is being printed? | Why llm_chain.invoke(ques_VN) output is interrupted when it is being printed?
I have a problem related to using llm_chain.invoke() to return the answer from ChatGPT. More specificially, when I want the function to return the answer, the output cannot be completed and is interrupted. I still don't understand what happe... | https://stackoverflow.com/questions/78765929/why-llm-chain-invokeques-vn-output-is-interrupted-when-it-is-being-printed | python, openai-api, langchain, chatgpt-api, py-langchain | 1,721,324,138 |
se_74907244 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I use batch embeddings using OpenAI's API? | How can I use batch embeddings using OpenAI's API?
I am using the OpenAI API to get embeddings for a bunch of sentences. And by a bunch of sentences, I mean a bunch of sentences, like thousands. Is there a way to make it faster or make it do the embeddings concurrently or something?
I tried Looping through and sen... | https://stackoverflow.com/questions/74907244/how-can-i-use-batch-embeddings-using-openais-api | python, embedding, openai-api | 1,671,880,362 |
se_78763439 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Error when tracing llm calls with Langsmith (Failed to get info from https://eu.smith.langchain.com) (Failed to batch ingest runs: LangSmithError)) | Error when tracing llm calls with Langsmith (Failed to get info from https://eu.smith.langchain.com) (Failed to batch ingest runs: LangSmithError))
I have an issue with lansgmith setup. I tried to search on the web for this issue, but could not find a solution. I follow these steps:
Created a new fresh environment:
... | https://stackoverflow.com/questions/78763439/error-when-tracing-llm-calls-with-langsmith-failed-to-get-info-from-https-eu | openai-api, langchain, large-language-model, langsmith | 1,721,294,001 |
se_78700449 | stackoverflow | ARTIFICIAL_INTELLIGENCE | I'm using text-generation library of Python to call a hugging-face inference API for text-generation purposes. But I keep getting this user-warning | I'm using text-generation library of Python to call a hugging-face inference API for text-generation purposes. But I keep getting this user-warning
import text_generation
def generate_job_responsibilities(job_title, work_experience_required, skillset_required):
client = text_generation.InferenceAPIClient("Open... | https://stackoverflow.com/questions/78700449/im-using-text-generation-library-of-python-to-call-a-hugging-face-inference-api | python, huggingface-transformers, openai-api | 1,719,988,923 |
se_78756859 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Backend audio chunks aren't playing correctly when I pass them to client | Backend audio chunks aren't playing correctly when I pass them to client
First, I apologize if anything is spelled incorrectly or if I don't explain myself clearly enough as english is not my first languale.
Now to the problem. I am both starting to work with OpenAI API and WebSockets. I understand the basics and ... | https://stackoverflow.com/questions/78756859/backend-audio-chunks-arent-playing-correctly-when-i-pass-them-to-client | javascript, python, websocket, openai-api, audio-streaming | 1,721,166,302 |
se_78755548 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API either does not answer question or I cannot find where the response is given | OpenAI API either does not answer question or I cannot find where the response is given
Problem Summary
I am trying to us OpenAI API to make a batch request to chatgtp 3.5 turbo using Google Colab. It seems to work fine but it only returns the prompt. It never answers the question with the 1000 max_new_token allowance... | https://stackoverflow.com/questions/78755548/openai-api-either-does-not-answer-question-or-i-cannot-find-where-the-response-i | openai-api | 1,721,144,833 |
se_78707409 | stackoverflow | ARTIFICIAL_INTELLIGENCE | RateLimitError: Error code: 429 while running a RAG application consisting gpt-4oAPI,Pinecone vector store,AzureAIDocumentIntelligenceLoader | RateLimitError: Error code: 429 while running a RAG application consisting gpt-4oAPI,Pinecone vector store,AzureAIDocumentIntelligenceLoader
Hi I am currently trying to run a RAG application (FAQ chatbot) which consists of 2 UI one where we can separately upload the files and store its embeddings in PineCone Vector s... | https://stackoverflow.com/questions/78707409/ratelimiterror-error-code-429-while-running-a-rag-application-consisting-gpt-4 | python, openai-api, langchain, azure-form-recognizer, pinecone | 1,720,100,051 |
se_75919055 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to restrict the open AI API responses to only tech/software related? If user asks non tech question then say 'Not related' | How to restrict the open AI API responses to only tech/software related? If user asks non tech question then say 'Not related'
How to restrict the below open AI API to respond only to certain fields. For example only software and tech related queries needs to be answered otherwise it should respond with "Not r... | https://stackoverflow.com/questions/75919055/how-to-restrict-the-open-ai-api-responses-to-only-tech-software-related-if-user | openai-api | 1,680,522,044 |
se_78678388 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ChatCompletion call with image as data url not working with com.azure:azure-ai-openai:1.0.0-beta.9 | ChatCompletion call with image as data url not working with com.azure:azure-ai-openai:1.0.0-beta.9
I am trying to send an image for ChatCompletion using the Microsoft provided Azure OpenAi java sdk "com.azure:azure-ai-openai:1.0.0-beta.9".
val cco = ChatCompletionsOptions(
mutableListOf(
ChatRequestSys... | https://stackoverflow.com/questions/78678388/chatcompletion-call-with-image-as-data-url-not-working-with-com-azureazure-ai-o | openai-api, azure-openai, azure-sdk | 1,719,499,791 |
se_78725290 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to pass mode config to AzureOpenAIEmbeddings() to create embeddings model | How to pass mode config to AzureOpenAIEmbeddings() to create embeddings model
I'm trying to use Azure openai deployment to generate embeddings and store them in Redis vectorDB. I created the embeddings model as follow and pass the model_config (like embedding_ctx_length, generation_max_tokens, allowed_special, model_k... | https://stackoverflow.com/questions/78725290/how-to-pass-mode-config-to-azureopenaiembeddings-to-create-embeddings-model | redis, openai-api, langchain, azure-openai | 1,720,524,097 |
se_76254947 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAi tokens consumed in generating response of a query from custom knowledge base | OpenAi tokens consumed in generating response of a query from custom knowledge base
I am using OpenAI API to build a chatbot based on data feed by me, its consuming more tokens as predicted by words count from query & response,what is the reason?
I provided the chatbot with file containing details about finals of fifa... | https://stackoverflow.com/questions/76254947/openai-tokens-consumed-in-generating-response-of-a-query-from-custom-knowledge-b | artificial-intelligence, openai-api, large-language-model | 1,684,159,685 |
se_75687828 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Permission problems with Google Sheet Script for ai SEO website audit | Permission problems with Google Sheet Script for ai SEO website audit
I am trying to implement a code snippet from an article to help with some home / hobby SEO projects. The script should pull a website, run an audit, and make suggestions.
I run into a permission issue where Google is blocking the request. Everything... | https://stackoverflow.com/questions/75687828/permission-problems-with-google-sheet-script-for-ai-seo-website-audit | javascript, google-sheets, google-apps-script, openai-api, urlfetch | 1,678,381,564 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.