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_79637754
stackoverflow
ARTIFICIAL_INTELLIGENCE
Openai Multi Agent Sdk - Function tool has input parameter as Dict. throws additionalProperties should not be set for object types
Openai Multi Agent Sdk - Function tool has input parameter as Dict. throws additionalProperties should not be set for object types @function_tool def filter_data (input_data_str: Dict , key : str , operator: str , value: Union[str,int] ) -> Dict : This error is raised when I try to run the python program. Openai...
https://stackoverflow.com/questions/79637754/openai-multi-agent-sdk-function-tool-has-input-parameter-as-dict-throws-addit
openai-api, multi-agent
1,748,183,185
se_79602663
stackoverflow
ARTIFICIAL_INTELLIGENCE
In Spring.AI 1.0.0-SnapShot Why am I getting Unknown parameter: 'response_format.schema
In Spring.AI 1.0.0-SnapShot Why am I getting Unknown parameter: 'response_format.schema https://docs.spring.io/spring-ai/reference/api/chat/openai-chat.html https://spring.io/blog/2024/08/09/spring-ai-embraces-openais-structured-outputs-enhancing-json-response Above is the documentation for the spring.ai for struc...
https://stackoverflow.com/questions/79602663/in-spring-ai-1-0-0-snapshot-why-am-i-getting-unknown-parameter-response-format
java, spring, openai-api, spring-ai
1,746,142,931
se_79630713
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenAI GPT-3 token logprobs and word-level surprisal: inconsistent values and missing outputs for multi-token targets
OpenAI GPT-3 token logprobs and word-level surprisal: inconsistent values and missing outputs for multi-token targets I’m trying to compute word-level surprisal values for a set of sentence stimuli using OpenAI’s Completions API (legacy endpoint). In information-theoretic terms, surprisal is the negative base-2 logari...
https://stackoverflow.com/questions/79630713/openai-gpt-3-token-logprobs-and-word-level-surprisal-inconsistent-values-and-mi
python, nlp, huggingface-transformers, tokenize, openai-api
1,747,753,706
se_79635961
stackoverflow
ARTIFICIAL_INTELLIGENCE
Openai Eval how do I add my tools, like I do for production?
Openai Eval how do I add my tools, like I do for production? My production environment loads tools, it contains my functions schema, it's important because that's the response is calling for the tools, so I can't really eval a response when the eval doesn't have the tools. I'm trying to create an eval that actually ha...
https://stackoverflow.com/questions/79635961/openai-eval-how-do-i-add-my-tools-like-i-do-for-production
openai-api, chatgpt-api
1,748,020,350
se_79635867
stackoverflow
ARTIFICIAL_INTELLIGENCE
GPT API and Pydantic model description field - what happens to it?
GPT API and Pydantic model description field - what happens to it? say I have the following snippet of code: from pydantic import BaseModel, Field class TableRow(BaseModel): net_amount: float = Field(..., description="The amount before taxes of the line item") gross_amount: float = Field(..., description="The...
https://stackoverflow.com/questions/79635867/gpt-api-and-pydantic-model-description-field-what-happens-to-it
openai-api
1,748,016,444
se_75773659
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can I create a post-streaming SSE API with NestJS and Fastify, like OpenAI's API?
How can I create a post-streaming SSE API with NestJS and Fastify, like OpenAI's API? I'm trying to implement a Server-Sent Events (SSE) streaming API using NestJS and Fastify, similar to the OpenAI's Create chat completion API. And I want my clients to receive the streamed data using axios with responseType: "str...
https://stackoverflow.com/questions/75773659/how-can-i-create-a-post-streaming-sse-api-with-nestjs-and-fastify-like-openais
node.js, openai-api, nodejs-stream
1,679,109,170
se_79629981
stackoverflow
ARTIFICIAL_INTELLIGENCE
Issues Getting Ghibli-Style Image Output with Gemini API - What Am I Missing?
Issues Getting Ghibli-Style Image Output with Gemini API - What Am I Missing? I'm starting a venture in AI-powered image applications, and as a learning project, I'm developing a small app that transforms input images into Ghibli-style animation art. To experiment with different APIs, I tried the following models unde...
https://stackoverflow.com/questions/79629981/issues-getting-ghibli-style-image-output-with-gemini-api-what-am-i-missing
python, artificial-intelligence, openai-api, google-gemini
1,747,726,382
se_79627663
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to ensure the model always uses the latest user-provided context after a sequence of context + audio turns?
How to ensure the model always uses the latest user-provided context after a sequence of context + audio turns? I'm building an application using the Google Gemini Flash Live API (genai) where the user can send updated context (for example, a new code snippet or document text) followed by live audio input (e.g., askin...
https://stackoverflow.com/questions/79627663/how-to-ensure-the-model-always-uses-the-latest-user-provided-context-after-a-seq
openai-api, google-gemini
1,747,588,103
se_79614255
stackoverflow
ARTIFICIAL_INTELLIGENCE
Cannot get any response from langchain ChatOpenAI, no matter how long I wait
Cannot get any response from langchain ChatOpenAI, no matter how long I wait My code is as follows: import { config } from "dotenv"; import { ChatOpenAI } from "@langchain/openai"; config({ override: true }) const openai = new ChatOpenAI({ model: "gpt-4o-mini" }) openai.invoke("Hello").then(data=>{ console.log(da...
https://stackoverflow.com/questions/79614255/cannot-get-any-response-from-langchain-chatopenai-no-matter-how-long-i-wait
javascript, openai-api, langchain, tsx
1,746,798,013
se_79624915
stackoverflow
ARTIFICIAL_INTELLIGENCE
Sometimes no response is displayed, even though HTTP 200 is returned
Sometimes no response is displayed, even though HTTP 200 is returned I'm building a lightweight personal chatbot that uses the OpenAI Chat API. The chatbot is embedded into a custom HTML/JS frontend and runs on a PHP backend that sends the prompt and gives back the result using curl_setopt($ch, CURLOPT_WRITEFUNCTION, ...
https://stackoverflow.com/questions/79624915/sometimes-no-response-is-displayed-even-though-http-200-is-returned
php, chatbot, openai-api
1,747,388,571
se_71873182
stackoverflow
ARTIFICIAL_INTELLIGENCE
No module named openai
No module named openai I've installed openai on my laptop with pip install openai. Have installed on my laptop and after installed on the same folder where my code file is. But when I try to run the code I get ImportError: No module named openai This is the code from the file. Pretty simple: import openai openai.api_...
https://stackoverflow.com/questions/71873182/no-module-named-openai
python, visual-studio, openai-api
1,649,946,176
se_79235395
stackoverflow
ARTIFICIAL_INTELLIGENCE
Langchain Agent error - ValueError: Prompt missing required variables: {'agent_scratchpad', 'tool_names', 'tools'}
Langchain Agent error - ValueError: Prompt missing required variables: {'agent_scratchpad', 'tool_names', 'tools'} I am having an issue with simple langchain agent creation v0.3, documentation is also not so great. I don't know why my simple agent isn't working. Here is my code, and I don't kno...
https://stackoverflow.com/questions/79235395/langchain-agent-error-valueerror-prompt-missing-required-variables-agent-s
openai-api, langchain, langchain-agents
1,732,831,461
se_79607373
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to exclude thinking steps when streaming from `google/gemini-2.5-flash-preview:thinking` via OpenRouter and OpenAI library?
How to exclude thinking steps when streaming from `google/gemini-2.5-flash-preview:thinking` via OpenRouter and OpenAI library? I am using the openai Python library to stream chat completions from the google/gemini-2.5-flash-preview:thinking model via the OpenRouter API. My goal is to get only the final assistant resp...
https://stackoverflow.com/questions/79607373/how-to-exclude-thinking-steps-when-streaming-from-google-gemini-2-5-flash-previ
python, openai-api, google-gemini, openrouter
1,746,465,648
se_75313457
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenAI API: openai.api_key = os.getenv() not working
OpenAI API: openai.api_key = os.getenv() not working I am just trying some simple functions in Python with OpenAI APIs but running into an error: I have a valid API secret key which I am using. Code: >>> import os >>> import openai >>> openai.api_key = os.getenv("I have placed the key here") >>> response = openai.Comp...
https://stackoverflow.com/questions/75313457/openai-api-openai-api-key-os-getenv-not-working
python, openai-api, chatgpt-api, gpt-3, gpt-4
1,675,269,872
se_79615341
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenAI Functions Tool calling not actually calling for function
OpenAI Functions Tool calling not actually calling for function So I have the most basic example I can do here, I don't get it, I created a functions to be used by the response, I labeled it and everything, and nothing, it just answers on it's own and doesn't actually ask to use the function. I don't get it. require('...
https://stackoverflow.com/questions/79615341/openai-functions-tool-calling-not-actually-calling-for-function
openai-api
1,746,869,605
se_78833840
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenAI API: How do I upload a file and ask a model about it?
OpenAI API: How do I upload a file and ask a model about it? I am trying to upload a PDF file and ask the model to give me a JSON object containing its data by what it understood. Here is my code: app.get("/", async (req: Request, res: Response) => { if (!openai) { res.status(500).send("OpenAI object not created...
https://stackoverflow.com/questions/78833840/openai-api-how-do-i-upload-a-file-and-ask-a-model-about-it
openai-api, gpt-4
1,722,851,483
se_77824019
stackoverflow
ARTIFICIAL_INTELLIGENCE
Input to ChatPromptTemplate is missing variables {'input', 'agent_scratchpad'}. Expected: ['agent_scratchpad', 'input']
Input to ChatPromptTemplate is missing variables {'input', 'agent_scratchpad'}. Expected: ['agent_scratchpad', 'input'] This code gives me an weird error: from langchain_core.output_parsers import StrOutputParser from langchain_core.runnables import RunnableLambda, RunnablePassthrough ...
https://stackoverflow.com/questions/77824019/input-to-chatprompttemplate-is-missing-variables-input-agent-scratchpad
python, openai-api, prompt, langchain, keyerror
1,705,389,395
se_79129189
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to get OpenAI realtime API's text return from Agora RTC client side?
How to get OpenAI realtime API's text return from Agora RTC client side? I have a question about integrating Agora with Openai's realtime API. How to get the text returned by openai realtime API from the client? I'm following this page: https://docs.agora.io/en/open-ai-integration/get-started/quickstart?platform=p...
https://stackoverflow.com/questions/79129189/how-to-get-openai-realtime-apis-text-return-from-agora-rtc-client-side
android, ios, chat, openai-api, agora
1,729,966,420
se_78262843
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenAI API error: "Configuration is not a constructor"
OpenAI API error: "Configuration is not a constructor" I'm trying to build a Discord bot that generates images, but I faced a problem. I'm getting the following error: Configuration is not a constructor I'm following a YouTube tutorial. I have the following code: const { SlashCommandBuilder, EmbedBuilder} ...
https://stackoverflow.com/questions/78262843/openai-api-error-configuration-is-not-a-constructor
javascript, discord, discord.js, bots, openai-api
1,712,076,119
se_77725698
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to achieve text streaming in react native using openai api?
How to achieve text streaming in react native using openai api? I am working on a react native chat app, and I would like to use openai api to implement auto replying. There is stream available from openai's api, but it uses SSE, which seems not working well in react native. Is there any way that I can use text stream...
https://stackoverflow.com/questions/77725698/how-to-achieve-text-streaming-in-react-native-using-openai-api
reactjs, react-native, openai-api, server-sent-events
1,703,750,973
se_79605756
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Connect a Dockerized Python App to Ollama Running on Host (localhost:11434) – Connection Error
How to Connect a Dockerized Python App to Ollama Running on Host (localhost:11434) – Connection Error I'm running Ollama locally on my machine with the llama3.2:latest model. I can confirm the model is up and running: ollama ps NAME ID SIZE PROCESSOR UNTIL llama3.2:latest a80c4f17acd5 4.0 GB 100% GPU 3 minutes...
https://stackoverflow.com/questions/79605756/how-to-connect-a-dockerized-python-app-to-ollama-running-on-host-localhost1143
docker, openai-api, ollama, nixpacks
1,746,372,303
se_79607906
stackoverflow
ARTIFICIAL_INTELLIGENCE
Can we use one base language model for `create_react_agent()` and different models for the tools?
Can we use one base language model for `create_react_agent()` and different models for the tools? I have the following code block that uses langchain.create_react_agent to create an agent: movie_chat = prompt | llm | StrOutputParser() tools = [ Tool.from_function( name="Movie Chat", description="Fo...
https://stackoverflow.com/questions/79607906/can-we-use-one-base-language-model-for-create-react-agent-and-different-mode
openai-api, langchain, large-language-model, agent
1,746,500,717
se_79598009
stackoverflow
ARTIFICIAL_INTELLIGENCE
Getting web search is not supported in o4 mini , even though it is supported and my code should functionally be correct according to docs
Getting web search is not supported in o4 mini , even though it is supported and my code should functionally be correct according to docs this is my code : const payload = { model: "o4-mini-2025-04-16", tools: [{ type: "web_search_preview", // Optional: configure search context size (small, medium, high) search_conte...
https://stackoverflow.com/questions/79598009/getting-web-search-is-not-supported-in-o4-mini-even-though-it-is-supported-and
artificial-intelligence, openai-api
1,745,918,341
se_75908422
stackoverflow
ARTIFICIAL_INTELLIGENCE
whisper AI error : FP16 is not supported on CPU; using FP32 instead
whisper AI error : FP16 is not supported on CPU; using FP32 instead I'm trying to use whisper AI on my computer. I have a NVIDIA GPU RTX 2060, installed CUDA and FFMPEG. I'm running this code : import whisper model = whisper.load_model("medium") result = model.transcribe("venv/files/test1.mp3") print(result["text"]) ...
https://stackoverflow.com/questions/75908422/whisper-ai-error-fp16-is-not-supported-on-cpu-using-fp32-instead
python, speech-recognition, text-to-speech, openai-api, openai-whisper
1,680,377,543
se_79601906
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can I integrate LangSmith for observability in a multi-agent Autogen (AG2) GroupChat setup?
How can I integrate LangSmith for observability in a multi-agent Autogen (AG2) GroupChat setup? I'm working on a document analysis service using Autogen (AG2). The service has two main agents: a reader and an analyzer. The reader splits the document into chunks and sends them to the analyzer, who takes notes. This coo...
https://stackoverflow.com/questions/79601906/how-can-i-integrate-langsmith-for-observability-in-a-multi-agent-autogen-ag2-g
python, openai-api, langchain, observability, langsmith
1,746,104,978
se_77999036
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenAI Text-To-Speech API - NodeJS - How To Get A base64 Payloads Back
OpenAI Text-To-Speech API - NodeJS - How To Get A base64 Payloads Back I am using the OpenAI Text-To-Speach API as shown below and it works fine. It will build am MP3 and save on the server. But I need to have the audio in base64 format so that I can save it in a database and use it on a websocket. Currently OpenAI sa...
https://stackoverflow.com/questions/77999036/openai-text-to-speech-api-nodejs-how-to-get-a-base64-payloads-back
node.js, base64, openai-api
1,707,982,392
se_79153048
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to import types from openai in deno?
How to import types from openai in deno? In official npm openai package description https://www.npmjs.com/package/openai i see You can also import from jsr: import OpenAI from 'jsr:@openai/openai'; but typing deno add jsr:@openai/openai I getting error: jsr:@openai/openai was not found. and in jsr link https://jsr...
https://stackoverflow.com/questions/79153048/how-to-import-types-from-openai-in-deno
typescript, openai-api, deno, javascript-registry
1,730,647,826
se_77323710
stackoverflow
ARTIFICIAL_INTELLIGENCE
Can I fine-tune the again a gpt-3.5-turbo fine tuned model with more data?
Can I fine-tune the again a gpt-3.5-turbo fine tuned model with more data? I had fined tuned GPT 3.5 turbo model, can I fine tune that model again with more data to get better result. I tried to fine tune model again but I cannot, Is any possible way? Is prompt is very in good to fine tune a model. Without prompt, can...
https://stackoverflow.com/questions/77323710/can-i-fine-tune-the-again-a-gpt-3-5-turbo-fine-tuned-model-with-more-data
openai-api, fine-tuning, gpt-3
1,697,718,020
se_79594047
stackoverflow
ARTIFICIAL_INTELLIGENCE
Azure Functions not getting deployed
Azure Functions not getting deployed I tried to create Azure Function resource and in the function file whenever I import langchain openai, the deployment is successful but the function doesn't get deployed. const { app } = require('@azure/functions'); const { ChatOpenAI } = require("langchain/chat_models/openai"); a...
https://stackoverflow.com/questions/79594047/azure-functions-not-getting-deployed
node.js, azure-functions, openai-api, langchain, langchain-js
1,745,678,806
se_77245686
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenAI API error: "TypeError: Cannot read properties of undefined (reading 'choices')"
OpenAI API error: &quot;TypeError: Cannot read properties of undefined (reading &#39;choices&#39;)&quot; I looked into various possible solutions: OpenAI and Javascript error : Getting 'TypeError: Cannot read properties of undefined (reading 'create') at Object.<anonymous>" https://github.com/davila7/code-gpt-docs/is...
https://stackoverflow.com/questions/77245686/openai-api-error-typeerror-cannot-read-properties-of-undefined-reading-choi
javascript, node.js, user-input, openai-api, chatgpt-api
1,696,606,031
se_79580108
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to properly use OpenAI.RealtimeConversation.RealtimeConversationClient to start multiple RealtimeConversationSession(s)?
How to properly use OpenAI.RealtimeConversation.RealtimeConversationClient to start multiple RealtimeConversationSession(s)? The Azure OpenAI SDK appears to follow a one-client-per-session model, but I want to be sure. Since it is still in beta, it is not clear if a single instance of the client returned by AzureOpenA...
https://stackoverflow.com/questions/79580108/how-to-properly-use-openai-realtimeconversation-realtimeconversationclient-to-st
openai-api, azure-openai
1,744,924,919
se_79511467
stackoverflow
ARTIFICIAL_INTELLIGENCE
My AzureOpenAI batch job shows complete, but only a few rows (not all rows) are completed in the batch file without any error
My AzureOpenAI batch job shows complete, but only a few rows (not all rows) are completed in the batch file without any error I have tried uploading a batch job with unique custom_id for each row in my input file. The job gets validated but completes very quickly and once I check the job only 276/4096 (as shown in the...
https://stackoverflow.com/questions/79511467/my-azureopenai-batch-job-shows-complete-but-only-a-few-rows-not-all-rows-are
batch-processing, openai-api, azure-openai
1,742,057,949
se_79480733
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Reduce OpenAI Azure Response Time for Structured Output Using GPT-4o Mini (Fine-Tuned Model)?
How to Reduce OpenAI Azure Response Time for Structured Output Using GPT-4o Mini (Fine-Tuned Model)? I am using an Azure OpenAI GPT-4o Mini fine-tuned model to generate structured responses (e.g., JSON format). However, the response time is higher than expected, and I am looking for ways to optimize it. Expected: Lowe...
https://stackoverflow.com/questions/79480733/how-to-reduce-openai-azure-response-time-for-structured-output-using-gpt-4o-mini
openai-api, latency, azure-openai
1,740,996,926
se_79560017
stackoverflow
ARTIFICIAL_INTELLIGENCE
Azure OpenAI Embedding SDK (C#) – Official example uses outdated types and alternatives return 404
Azure OpenAI Embedding SDK (C#) – Official example uses outdated types and alternatives return 404 I have successfully deployed a model (text-embedding-3-large) using the Azure OpenAI portal, and I'm now trying to integrate it using the OpenAI .NET SDK. The Azure portal itself provides the following code snippet as an...
https://stackoverflow.com/questions/79560017/azure-openai-embedding-sdk-c-official-example-uses-outdated-types-and-alter
c#, openai-api, azure-openai, openaiembeddings
1,744,032,880
se_79165354
stackoverflow
ARTIFICIAL_INTELLIGENCE
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (tiktoken)
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (tiktoken) I am trying to install langchain_openai in my local machine with the python version 3.9 using pip i passed below command: pip install langchain_openai I am getting below error ERROR: ERROR: Failed to build installable w...
https://stackoverflow.com/questions/79165354/error-error-failed-to-build-installable-wheels-for-some-pyproject-toml-based-p
python-3.x, openai-api, langchain, py-langchain
1,730,963,232
se_79578018
stackoverflow
ARTIFICIAL_INTELLIGENCE
Suddenly getting 400 Bad Request error calling OpenAI.Chat.ChatClient.CompleteChat()
Suddenly getting 400 Bad Request error calling OpenAI.Chat.ChatClient.CompleteChat() Late last week, our Azure-based RAG chat service started returning HTTP 400 Bad Request errors. We are running a web API on ASP.NET Core 8. Nothing in the code changed, and I have verified that our code follows examples for Azure.AI.O...
https://stackoverflow.com/questions/79578018/suddenly-getting-400-bad-request-error-calling-openai-chat-chatclient-completech
azure, asp.net-core, openai-api, azure-openai
1,744,833,661
se_79588648
stackoverflow
ARTIFICIAL_INTELLIGENCE
Gemini AI Structured Output with references via OpenAI SDK
Gemini AI Structured Output with references via OpenAI SDK I'm using OpenRouter (OpenAI-compatible proxy) as an abstraction layer to call different LLM providers with a consistent interface, including Google's Gemini models. I've set up my code to use structured outputs with Pydantic models through OpenAI's beta.chat....
https://stackoverflow.com/questions/79588648/gemini-ai-structured-output-with-references-via-openai-sdk
openapi, openai-api, google-gemini
1,745,412,164
se_79574584
stackoverflow
ARTIFICIAL_INTELLIGENCE
trying to generate an image using openai api
trying to generate an image using openai api so I'm trying to generate an image using the api - tried in python using the openai client and using requests - didn't work - got it down to this curl: curl https://api.openai.com/v1/images/generations \ -H "Authorization: Bearer removed" \ -H "Content-Type: application...
https://stackoverflow.com/questions/79574584/trying-to-generate-an-image-using-openai-api
image, openai-api
1,744,702,241
se_79585282
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to reduce response latency in Azure OpenAI GPT-3.5 Turbo &amp; GPT-4 API?
How to reduce response latency in Azure OpenAI GPT-3.5 Turbo &amp; GPT-4 API? I'm using the Azure OpenAI API with GPT-3.5 Turbo and GPT-4 models. I'm currently experiencing average response times of: GPT-3.5 Turbo: ~900ms GPT-4: ~1.3 seconds I’m already using the following parameters to reduce latency: { "messages": [...
https://stackoverflow.com/questions/79585282/how-to-reduce-response-latency-in-azure-openai-gpt-3-5-turbo-gpt-4-api
rest, openai-api, azure-openai, gpt-3, gpt-4
1,745,267,143
se_78638508
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenAI library do not support vless protocol
OpenAI library do not support vless protocol I`m tried to use vless proxy for openai import requests from openai import OpenAI proxies = { 'vless': 'vless://proxy_data' } client = OpenAI(api_key="key", base_url=proxies.get("vless")) responce = client.chat.completions.create(model="gpt-4", messages="Hi!") print...
https://stackoverflow.com/questions/78638508/openai-library-do-not-support-vless-protocol
python, python-3.x, proxy, openai-api
1,718,726,338
se_77442646
stackoverflow
ARTIFICIAL_INTELLIGENCE
openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details
openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details I recently obtained a free API key from OpenAI and attempted to use it in my script. However, I encountered the following error on my very first attempt: openai.error.RateLimitError: You exceeded your current quota...
https://stackoverflow.com/questions/77442646/openai-error-ratelimiterror-you-exceeded-your-current-quota-please-check-your
python, openai-api, chatgpt-api
1,699,413,393
se_79581938
stackoverflow
ARTIFICIAL_INTELLIGENCE
How do you get Azure OpenAI to return json in C#?
How do you get Azure OpenAI to return json in C#? If I want to return json from Azure OpenAI, such as Gpt-4o, how do I get it to respond in json? I've found examples in Python, but none using the Azure.AI.OpenAI sdk library for C# .NET.
https://stackoverflow.com/questions/79581938/how-do-you-get-azure-openai-to-return-json-in-c
c#, json, .net, openai-api, azure-openai
1,745,026,132
se_79573908
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenAI Assistants with citations like【4:2†source】and citeturnXfileY
OpenAI Assistants with citations like【4:2†source】and citeturnXfileY When streaming with OpenAI Assistants openai.beta.threads.messages.create( thread_id=thread_id, role="user", content=payload.question ) run = openai.beta.threads.runs.create( thread_id=thread_id, assistant_id=assistant_id, s...
https://stackoverflow.com/questions/79573908/openai-assistants-with-citations-like-42-source-and-citeturnxfiley
python, fastapi, openai-api, openai-assistants-api
1,744,659,772
se_76630950
stackoverflow
ARTIFICIAL_INTELLIGENCE
Fit the chat response into a list in GPT API
Fit the chat response into a list in GPT API I'm trying to get the emotion in a text using chatgpt API def infer_feeling(text): prompt = f"What feeling is filled in the following text?\nText: {text}\nFeeling:" response = openai.ChatCompletion.create( model=model, messages=[ {"role"...
https://stackoverflow.com/questions/76630950/fit-the-chat-response-into-a-list-in-gpt-api
python, openai-api, chatgpt-api, large-language-model
1,688,661,815
se_79571709
stackoverflow
ARTIFICIAL_INTELLIGENCE
error in sending request to chatGPT using API key
error in sending request to chatGPT using API key I want to pass a grading request to ChatGPT via API key. the request worked when I passed a text message, but I faced errors when I tried to pass a pdf file that contains the text. The grading service is supposed to let you upload the exam PDF to get the grading result...
https://stackoverflow.com/questions/79571709/error-in-sending-request-to-chatgpt-using-api-key
key, openai-api
1,744,557,796
se_76653119
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenAI GPT-4 API error: &quot;The model: gpt-4 does not exist&quot;
OpenAI GPT-4 API error: &quot;The model: gpt-4 does not exist&quot; I have code as below, it works perfect with model gpt-3.5-turbo but not with gpt-4: $your_prompt = "Prompt...." // GPT-4 API call $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.openai.com/v1/chat/completions'); curl_setopt($ch, CURLOP...
https://stackoverflow.com/questions/76653119/openai-gpt-4-api-error-the-model-gpt-4-does-not-exist
openai-api, php-curl, gpt-4
1,688,987,298
se_78713460
stackoverflow
ARTIFICIAL_INTELLIGENCE
Not able to get OpenAI assistant&#39;s reply after handling thread.run.requires_action event in a run
Not able to get OpenAI assistant&#39;s reply after handling thread.run.requires_action event in a run I'm going to try formulating this high-level. I know it's not ideal, but bear with me. I'm sure if you recognize the problem, you're able to give me a clue: Setup: I'm messing with the OpenAI Assistans API on NodeJS ...
https://stackoverflow.com/questions/78713460/not-able-to-get-openai-assistants-reply-after-handling-thread-run-requires-acti
node.js, openai-api, openai-assistants-api
1,720,220,510
se_79567531
stackoverflow
ARTIFICIAL_INTELLIGENCE
API responds with 500 error when calling OpenAI from Next.js
API responds with 500 error when calling OpenAI from Next.js I'm trying to use the OpenAI API to analyze a physics question in my Next.js project. However, when I send a POST request to my API, I receive a 500 Internal Server Error. I've checked the code and confirmed that my API key is valid, but I can't resolve this...
https://stackoverflow.com/questions/79567531/api-responds-with-500-error-when-calling-openai-from-next-js
javascript, reactjs, next.js, openai-api, http-status-code-500
1,744,316,856
se_77940468
stackoverflow
ARTIFICIAL_INTELLIGENCE
Evaluation of answers obtained from RAG architecture with RAGAS without OPENAI keys
Evaluation of answers obtained from RAG architecture with RAGAS without OPENAI keys I have used Llama2 open source models for creating a chatbot for my personal documents using RAG architecture. I wish to evaluate the results obtained from RAG architecture with evaluation metrics , may be from RAGAS module. But it ins...
https://stackoverflow.com/questions/77940468/evaluation-of-answers-obtained-from-rag-architecture-with-ragas-without-openai-k
openai-api, langchain, evaluation, large-language-model, llama
1,707,131,602
se_79542433
stackoverflow
ARTIFICIAL_INTELLIGENCE
Translating HTML Content with OpenAI API in PHP While Preserving Formatting
Translating HTML Content with OpenAI API in PHP While Preserving Formatting I have an email or blog post containing HTML with inline elements like <span>, <p>, <strong> and custom attributes. Right now I send the entire HTML directly to OpenAI’s API translation and get a translated response. However, when the content ...
https://stackoverflow.com/questions/79542433/translating-html-content-with-openai-api-in-php-while-preserving-formatting
php, regex, translation, openai-api
1,743,197,039
se_77996274
stackoverflow
ARTIFICIAL_INTELLIGENCE
Importing the OpenAI Python dependency into AWS Lambda fails
Importing the OpenAI Python dependency into AWS Lambda fails I am trying to add the OpenAI Python library to my AWS Lambda function. I tried to add them via AWS Lambda Layers as described in this guide. However, when executing my code, the addition of this line: import openai leads to this error-response: Response { ...
https://stackoverflow.com/questions/77996274/importing-the-openai-python-dependency-into-aws-lambda-fails
amazon-web-services, aws-lambda, openai-api, aws-lambda-layers
1,707,932,264
se_78769972
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to stop Semantic Kernel function automatically filling in parameters?
How to stop Semantic Kernel function automatically filling in parameters? I'm using ai to take an input from a user then based on the users input the ai will decide on what function to call. I'm using Microsoft semantic kernel, function calling method to do this. Foreach function I have parameters that need to be fill...
https://stackoverflow.com/questions/78769972/how-to-stop-semantic-kernel-function-automatically-filling-in-parameters
openai-api, chatgpt-api, chatgpt-function-call
1,721,400,192
se_79551798
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to get structured JSON output from OpenAI in n8n with custom extracted fields?
How to get structured JSON output from OpenAI in n8n with custom extracted fields? I'm trying to use the OpenAI integration in n8n to extract specific information from a client's message and return it in a structured JSON format. For example, I want the assistant to extract values like the client's name and city and r...
https://stackoverflow.com/questions/79551798/how-to-get-structured-json-output-from-openai-in-n8n-with-custom-extracted-field
chatbot, openai-api, gpt-4, n8n
1,743,642,234
se_78864386
stackoverflow
ARTIFICIAL_INTELLIGENCE
What causes the Econreset error with OpenAI libraries?
What causes the Econreset error with OpenAI libraries? I have an app using html and the OpenAI Whisper model. Everything works as intended, However I keep getting an error when it tries to fetch the text output from the OpenAI servers. I started the web page on localhost:8080 as normal, and I expected it to display th...
https://stackoverflow.com/questions/78864386/what-causes-the-econreset-error-with-openai-libraries
html, openai-api, openai-whisper
1,723,523,237
se_78845610
stackoverflow
ARTIFICIAL_INTELLIGENCE
Langchain sql agent not connecting to databricks unity catalog table
Langchain sql agent not connecting to databricks unity catalog table I am trying to use the Langchain sql agent to connect to a table in databricks unity catalog. I am getting an error that InvalidRequestError: Resource not found This is the code that I have written so far... %pip install langchain==0.0.279 databricks...
https://stackoverflow.com/questions/78845610/langchain-sql-agent-not-connecting-to-databricks-unity-catalog-table
python-3.x, openai-api, py-langchain, sql-agent
1,723,063,632
se_75465228
stackoverflow
ARTIFICIAL_INTELLIGENCE
Open AI error its returning 429 and unsafe header
Open AI error its returning 429 and unsafe header So this is the code not sure why isn't the open AI not working. Please do let me know thanks below is the code. import PropTypes from 'prop-types' import React , {useState} from 'react' const { Configuration, OpenAIApi } = require("openai"); function TextForm(prop...
https://stackoverflow.com/questions/75465228/open-ai-error-its-returning-429-and-unsafe-header
javascript, reactjs, openai-api
1,676,493,646
se_75586733
stackoverflow
ARTIFICIAL_INTELLIGENCE
ChatGPT Token Limit
ChatGPT Token Limit I want ChatGPT to remember past conversations and have a consistent (stateful) conversation. I have seen several code of ChatGPT prompt engineering. There were two ways to design the prompt shown below (pseudo code): Use a single input (Cheap) <- Better if possible Stack all of previous history (...
https://stackoverflow.com/questions/75586733/chatgpt-token-limit
text, nlp, prompt, openai-api, gpt-3
1,677,542,809
se_79329549
stackoverflow
ARTIFICIAL_INTELLIGENCE
File Search tool stops working when I enable custom function calling
File Search tool stops working when I enable custom function calling I'm building a chatbot using OpenAI's Assistant (beta) and want to combine: File Search – so the assistant can retrieve information from my uploaded PDF/manual (stored in a vector store). Function Calling – to enable custom actions (e.g., sending ema...
https://stackoverflow.com/questions/79329549/file-search-tool-stops-working-when-i-enable-custom-function-calling
openai-api, function-call, file-search
1,736,022,483
se_79535870
stackoverflow
ARTIFICIAL_INTELLIGENCE
Error: Unexpected token &#39;&lt;&#39;, &quot;&lt;!DOCTYPE &quot;... is not valid JSON For Laravel GPT integration
Error: Unexpected token &#39;&lt;&#39;, &quot;&lt;!DOCTYPE &quot;... is not valid JSON For Laravel GPT integration I'm trying to integrate ChatGPT with my Laravel application using an AJAX request to communicate with the Laravel backend. However, I keep getting the following error in my browser console when I try to s...
https://stackoverflow.com/questions/79535870/error-unexpected-token-doctype-is-not-valid-json-for-laravel-gpt-i
laravel, openai-api
1,742,979,591
se_78946484
stackoverflow
ARTIFICIAL_INTELLIGENCE
Problem with streamlit text_input and display result
Problem with streamlit text_input and display result I'm trying to create a chatbot-like app using Streamlit, and I'm facing some issues with the text_input and how to display that. To be more specific, when I click the button "Edit Chat Name" on it appears correctly the text_input field and I enter the text but inste...
https://stackoverflow.com/questions/78946484/problem-with-streamlit-text-input-and-display-result
python, artificial-intelligence, chatbot, openai-api, streamlit
1,725,411,956
se_79445386
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why is template variable resolution performed twice?
Why is template variable resolution performed twice? I have a application, which calls OpenAI chat. My users can enter text, which is used to create the prompt. The result should be a Java object, see Structured Output Converter. Unfortunatly, Spring AI is resolving the variables in the template twice. This causes an ...
https://stackoverflow.com/questions/79445386/why-is-template-variable-resolution-performed-twice
openai-api, spring-ai
1,739,794,980
se_76256249
stackoverflow
ARTIFICIAL_INTELLIGENCE
Logging in the Open AI python library
Logging in the Open AI python library I am using the open-ai python library. How can I enable logging of HTTP request/response/headers for all calls made to open-ai? I am not able to find anything specific in the API docs.
https://stackoverflow.com/questions/76256249/logging-in-the-open-ai-python-library
openai-api
1,684,169,136
se_79522482
stackoverflow
ARTIFICIAL_INTELLIGENCE
The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again
The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again I am creating a POC for a Chat bot using Azure OpenAI and .Net Core. I have created Open AI resource and Deployment Model in Azure. But I am getting error when calling Comple...
https://stackoverflow.com/questions/79522482/the-api-deployment-for-this-resource-does-not-exist-if-you-created-the-deployme
c#, .net, azure, openai-api, azure-openai
1,742,463,340
se_79527881
stackoverflow
ARTIFICIAL_INTELLIGENCE
Azure OpenAI Phi-4-multimodel-instruct: &#39;auto&#39; tool choice error when using runTools() method that worked with GPT-4o
Azure OpenAI Phi-4-multimodel-instruct: &#39;auto&#39; tool choice error when using runTools() method that worked with GPT-4o I recently switched from using GPT-4o to Phi-4-multimodel-instruct in my Next.js application using Azure AI services, but I'm encountering the following error: BadRequestError: 400 {"object":"e...
https://stackoverflow.com/questions/79527881/azure-openai-phi-4-multimodel-instruct-auto-tool-choice-error-when-using-runt
typescript, next.js, openai-api, azure-openai
1,742,666,492
se_78716319
stackoverflow
ARTIFICIAL_INTELLIGENCE
Dynamic input Function Wrappers in SpringAI
Dynamic input Function Wrappers in SpringAI Issue with Adding Function Wrappers in ChatClient for Dynamic Variables in Spring AI Context: I'm trying to implement a feature similar to the booking example provided by the Spring AI team on GitHub. However, the documentation seems outdated, and I am encountering errors wh...
https://stackoverflow.com/questions/78716319/dynamic-input-function-wrappers-in-springai
artificial-intelligence, openai-api, azure-openai, spring-ai
1,720,319,405
se_76520553
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenAI Fine-Tuning error - &#39;fileName contains an invalid filename: wrong suffix.&#39;
OpenAI Fine-Tuning error - &#39;fileName contains an invalid filename: wrong suffix.&#39; I am trying to fine-tune a GPT model through the Azure OpenAI API. I now need to upload the file to openai using the code below: file_name = "training_data_prepared.jsonl" upload_response = openai.File.create( file=open(file_n...
https://stackoverflow.com/questions/76520553/openai-fine-tuning-error-filename-contains-an-invalid-filename-wrong-suffix
openai-api, fine-tuning, azure-openai
1,687,329,150
se_79493596
stackoverflow
ARTIFICIAL_INTELLIGENCE
ChatClient$Builder that could not be found
ChatClient$Builder that could not be found I am newbie using GenAI APIs, however all suggestion around web were working fine until last month. From this March,2025, I have found those suggestions are not helping anymore. though I have created profile in openAI and DeepSeek and have token. Please check below code ref a...
https://stackoverflow.com/questions/79493596/chatclientbuilder-that-could-not-be-found
spring-boot, chatbot, openai-api, spring-ai
1,741,387,742
se_79436348
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to send format information at the beginning of a prompt?
How to send format information at the beginning of a prompt? I have a Spring AI application for calling the OpenAI chat API. The answer should be JSON, so I use structured output. For cost reasons I want to cache the format information. Research To use OpenAI prompt caching, I have to add format information at the beg...
https://stackoverflow.com/questions/79436348/how-to-send-format-information-at-the-beginning-of-a-prompt
openai-api, spring-ai
1,739,453,999
se_79480112
stackoverflow
ARTIFICIAL_INTELLIGENCE
Does streaming work for Llama models on OpenAI&#39;s python API?
Does streaming work for Llama models on OpenAI&#39;s python API? I setup streaming responses on a client that uses OpenAI's API on python. It is working fine for ChatGPT models, but when I attempt to use a Llama model (llama3.1-8b) I am getting a valid streaming response with no "chunks" in the streaming response. se...
https://stackoverflow.com/questions/79480112/does-streaming-work-for-llama-models-on-openais-python-api
streaming, openai-api, llama
1,740,972,563
se_79011004
stackoverflow
ARTIFICIAL_INTELLIGENCE
Package @azure/openai@2.0.0-beta.2 missing data_sources parameter for client.chat.completions.create call
Package @azure/openai@2.0.0-beta.2 missing data_sources parameter for client.chat.completions.create call I'm trying to query AzureOpenAI for chat completions, with on my own data (Azure Search), from TypeScript code. I use packages @azure/openai@2.0.0-beta.2 and openai@4.62.1. I followed the instructions from https:/...
https://stackoverflow.com/questions/79011004/package-azure-openai2-0-0-beta-2-missing-data-sources-parameter-for-client-cha
typescript, openai-api, azure-openai
1,726,986,160
se_78287134
stackoverflow
ARTIFICIAL_INTELLIGENCE
Using OpenAI API for answering questions about csv file
Using OpenAI API for answering questions about csv file I'm starting with OpenAI API and experimenting with langchain. I have a .csv file with approximately 1000 rows and 85 columns with string values. I found some beginner article that I followed and have a colab notebook with the following code: txt_file_path = '/co...
https://stackoverflow.com/questions/78287134/using-openai-api-for-answering-questions-about-csv-file
python, artificial-intelligence, openai-api, langchain, retrieval-augmented-generation
1,712,478,446
se_79511344
stackoverflow
ARTIFICIAL_INTELLIGENCE
WebSocket Disconnects After Returning Time Slots in Appointment Scheduling Flow
WebSocket Disconnects After Returning Time Slots in Appointment Scheduling Flow I’m building a real-time appointment scheduling system using the OpenAI Realtime API with WebSocket connections. The flow works as follows: The user requests to schedule an appointment. The AI assistant asks for the date and calls the getA...
https://stackoverflow.com/questions/79511344/websocket-disconnects-after-returning-time-slots-in-appointment-scheduling-flow
javascript, websocket, openai-api
1,742,052,535
se_76405986
stackoverflow
ARTIFICIAL_INTELLIGENCE
In LangChain, how to save the verbose output to a variable?
In LangChain, how to save the verbose output to a variable? I tried executing a langchain agent. I want to save the output from verbose into a variable, but all I can access from the agent.run is only the final answer. How can I save the verbose output to a variable so that I can use later? My code: import json from l...
https://stackoverflow.com/questions/76405986/in-langchain-how-to-save-the-verbose-output-to-a-variable
agent, openai-api, langchain, large-language-model
1,685,964,674
se_79477997
stackoverflow
ARTIFICIAL_INTELLIGENCE
API endpoint for AI chat completions worked on local but 500 on Cloudflare production
API endpoint for AI chat completions worked on local but 500 on Cloudflare production I am having problems with deploying my NextJS app, which is using an API endpoint for chat completions from OpenRouter AI. The API endpoint below worked well on my local, but when I wanted to deploy my app on Cloudflare, the Internal...
https://stackoverflow.com/questions/79477997/api-endpoint-for-ai-chat-completions-worked-on-local-but-500-on-cloudflare-produ
next.js, artificial-intelligence, cloudflare, openai-api, edge-runtime
1,740,850,885
se_79366942
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to change GitHub Copilot model in IntelliJ?
How to change GitHub Copilot model in IntelliJ? In VS Code there is simply a button at the bottom to pick what LLM model you want to use, I haven't been able to figure out how to do it in IntelliJ. More specifically I would like to use Claude Sonnet, if anyone knows a work around.
https://stackoverflow.com/questions/79366942/how-to-change-github-copilot-model-in-intellij
intellij-idea, openai-api, intellij-plugin, github-copilot
1,737,195,167
se_79491296
stackoverflow
ARTIFICIAL_INTELLIGENCE
Llama index query engine returns 0 nodes
Llama index query engine returns 0 nodes I'm trying to do a semantic query using llamaindex and OpenAI llm. Indexes are stored in a postgresql db with pgvector extensions. I have verified that embedding vectors and search indexes are there in db. Still I'm getting 0 nodes returned and an "empty Response" returned when...
https://stackoverflow.com/questions/79491296/llama-index-query-engine-returns-0-nodes
python, openai-api, agent, llama-index
1,741,323,132
se_79482671
stackoverflow
ARTIFICIAL_INTELLIGENCE
Smoothing Out Streamed Audio from ChatGPT
Smoothing Out Streamed Audio from ChatGPT For a class, I am trying to stream audio from a ChatGPT API response. The code below mostly works, and I am getting good quality when I play the saved file later, but if I try to do it live it is super choppy: # Initialize an empty AudioSegment for concatenation full_audio = A...
https://stackoverflow.com/questions/79482671/smoothing-out-streamed-audio-from-chatgpt
python, audio, openai-api
1,741,062,206
se_76654561
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to get a streaming answer from openAI chat-gpt-4?
How to get a streaming answer from openAI chat-gpt-4? I've heard that you can get streamed answers from Chat-GPT-4, but I don't find much of information about this. If I ask chat-gpt itself, it tells me that according to 2021, there is no such feature. Can I use streaming, and how?
https://stackoverflow.com/questions/76654561/how-to-get-a-streaming-answer-from-openai-chat-gpt-4
openai-api, chatgpt-api, chat-gpt-4
1,688,997,963
se_78635610
stackoverflow
ARTIFICIAL_INTELLIGENCE
Calculate token utilization for streaming endpoints in gemini
Calculate token utilization for streaming endpoints in gemini I want to get the token utilization for google gemini multimodal streaming endpoint in which I pass an image as input. Note for non streaming endpoints token information is returned by gemini models, but for streaming endpoints it is not returned. For open...
https://stackoverflow.com/questions/78635610/calculate-token-utilization-for-streaming-endpoints-in-gemini
streaming, tokenize, openai-api, google-cloud-vertex-ai
1,718,688,573
se_79393384
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to get LLMs to accurately infer relative days of the week
How to get LLMs to accurately infer relative days of the week I've been working on an LLM application that often needs to utilize relative days of the week from natural language - e.g if today is 2025-01-28 then this Friday should be 2025-01-31 however as much as I try to prompt and feed it dates, most LLMs I try perf...
https://stackoverflow.com/questions/79393384/how-to-get-llms-to-accurately-infer-relative-days-of-the-week
openai-api, large-language-model, google-gemini, claude
1,738,058,267
se_77437255
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to send metadata to the LLM together with docs and context?
How to send metadata to the LLM together with docs and context? How can I include a document's metadata from vector db (Qdrant in my case), and send them together with context to the LLM (OpenAI in my case). For example, I store anonymized resumes in my vector db and each one has metadata with source (name of the file...
https://stackoverflow.com/questions/77437255/how-to-send-metadata-to-the-llm-together-with-docs-and-context
python, openai-api, langchain, py-langchain, qdrant
1,699,351,340
se_79479435
stackoverflow
ARTIFICIAL_INTELLIGENCE
React with OpenAI streaming results in duplicate values when updating and showing the response
React with OpenAI streaming results in duplicate values when updating and showing the response I'm trying to stream the response from the OpenAI streamed response and display the response to the user in a chat interface. However, while each chunk of the response itself is correct my state ends up with duplicated words...
https://stackoverflow.com/questions/79479435/react-with-openai-streaming-results-in-duplicate-values-when-updating-and-showin
reactjs, openai-api
1,740,934,989
se_79412977
stackoverflow
ARTIFICIAL_INTELLIGENCE
Bitget Trading Bot, Futures Order doesnt work
Bitget Trading Bot, Futures Order doesnt work I just worked out a trading strategy and am now on coding a bot to execute the trades easier. I am working on the futures order module right now, and I always get the same error, no matter what I do. (Yes i am coding with chatgpt because im not a fulltime coder) Here's the...
https://stackoverflow.com/questions/79412977/bitget-trading-bot-futures-order-doesnt-work
python, bots, openai-api, trading
1,738,701,409
se_77279657
stackoverflow
ARTIFICIAL_INTELLIGENCE
How do you apply session state to Gradio&#39;s ChatInterface?
How do you apply session state to Gradio&#39;s ChatInterface? I have created a chatbot with the Gradio's gr.ChatInterface() and Langchain's ConversationalRetrievalChain with chat history. Once uploaded on Huggingface Spaces, I noticed the chat history was being shared across users. I have tried opening the link to my ...
https://stackoverflow.com/questions/77279657/how-do-you-apply-session-state-to-gradios-chatinterface
chatbot, openai-api, langchain, gradio
1,697,105,304
se_77701884
stackoverflow
ARTIFICIAL_INTELLIGENCE
how to get response from openai for assistants
how to get response from openai for assistants I have created Assistat in openai using chat gpt-4-1106-preview model Im trying to send some text to get response from Assistant my code in php is as follow <?php $api_key = $apiKey; // Replace with your actual OpenAI API key $assistant_id = 'asst_abc'; // Replace ...
https://stackoverflow.com/questions/77701884/how-to-get-response-from-openai-for-assistants
php, openai-api
1,703,223,953
se_75609274
stackoverflow
ARTIFICIAL_INTELLIGENCE
Trying to create a wordpress plugin that generates a blog based on a form using OpenAI API
Trying to create a wordpress plugin that generates a blog based on a form using OpenAI API As the title says, I am trying to write a WordPress plugin that extracts info from a Contact 7 Form, sends it to the OpenAI API, and returns the generated text in a text box for the user to read. I have never created a WordPress...
https://stackoverflow.com/questions/75609274/trying-to-create-a-wordpress-plugin-that-generates-a-blog-based-on-a-form-using
php, wordpress, rest, openai-api, wordpress-rest-api
1,677,706,703
se_78942124
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to install langchain-openai that is compatible with existing openai installation?
How to install langchain-openai that is compatible with existing openai installation? I am migrating to langchain version 0.2 in my project, which now requires installing LLM models separately. I attempted to install langchain-openai using: pipenv install langchain-openai However, this conflicts with another package ...
https://stackoverflow.com/questions/78942124/how-to-install-langchain-openai-that-is-compatible-with-existing-openai-installa
python, openai-api, langchain, pipenv, py-langchain
1,725,314,128
se_76887680
stackoverflow
ARTIFICIAL_INTELLIGENCE
Error adding package: &#39;No git executable was found&#39;
Error adding package: &#39;No git executable was found&#39; I've been trying to add the OpenAI-Unity 'https://github.com/srcnalt/OpenAI-Unity' package to my project but I am receiving this error: Cannot perform upm operation: Unable to add package [https://github.com/srcnalt/OpenAI-Unity.git]: No 'git' executable was ...
https://stackoverflow.com/questions/76887680/error-adding-package-no-git-executable-was-found
c#, git, unity-game-engine, openai-api, package-managers
1,691,813,094
se_79452528
stackoverflow
ARTIFICIAL_INTELLIGENCE
Azure Devops Pull Request Review Integration with AzureOpenAI instance
Azure Devops Pull Request Review Integration with AzureOpenAI instance We are using Azure Devops Server 2022 on-premise and we have a private Azure OpenAI instance enabled with a private endpoint. In VSTS marketplace, we were able to find many extensions: https://marketplace.visualstudio.com/items?itemName=mlk5436.Azu...
https://stackoverflow.com/questions/79452528/azure-devops-pull-request-review-integration-with-azureopenai-instance
azure-devops, openai-api, azure-openai, azure-devops-extensions, gpt-4
1,739,992,426
se_79451488
stackoverflow
ARTIFICIAL_INTELLIGENCE
Calculating total cost of OpenAI reponses with cached input tokens
Calculating total cost of OpenAI reponses with cached input tokens Should I subtract the number of cached input tokens from the number of input tokens when I receive the 'Usage' object back in the OpenAI response? I'm trying to calculate the total cost of the response for the following values: Input: 1204 Cached inpu...
https://stackoverflow.com/questions/79451488/calculating-total-cost-of-openai-reponses-with-cached-input-tokens
openai-api, azure-openai
1,739,971,438
se_79395145
stackoverflow
ARTIFICIAL_INTELLIGENCE
Error: &#39;&gt;=&#39; not supported between instances of &#39;int&#39; and &#39;str&#39; when searching for jobs using LangChain and OpenAI
Error: &#39;&gt;=&#39; not supported between instances of &#39;int&#39; and &#39;str&#39; when searching for jobs using LangChain and OpenAI I'm working on a Python script that uses LangChain and OpenAI to search for machine learning jobs based on my CV. However, I'm encountering the following error: Error searching f...
https://stackoverflow.com/questions/79395145/error-not-supported-between-instances-of-int-and-str-when-searching-fo
python, openai-api, jobs, langchain, browser-use
1,738,097,197
se_79325427
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to get this C# code working for HuggingFace models
How to get this C# code working for HuggingFace models I am doing some research and I have to use LLM models on different platforms APIs 1- OpenAI ChatGPT 4 2- Groq Llama 3.2 3- HuggingFace Llama 3.3 I built code that works on OpenAI ChatGPT 4 & Groq Llama 3.2 but when I tried to call HuggingFace Llama 3.3 it failed...
https://stackoverflow.com/questions/79325427/how-to-get-this-c-code-working-for-huggingface-models
openai-api, large-language-model, huggingface, groq
1,735,874,420
se_79450260
stackoverflow
ARTIFICIAL_INTELLIGENCE
iPhone Audio coming from top speaker for Open AI Realtime API Expo and Web RTC
iPhone Audio coming from top speaker for Open AI Realtime API Expo and Web RTC I am trying to implement the Open AI realtime API with Expo mobile app using react-native-webrtc-web-shim library. The functionality works. However, whenever the audio plays on the iPhone, it is out of the top speaker of the device. I under...
https://stackoverflow.com/questions/79450260/iphone-audio-coming-from-top-speaker-for-open-ai-realtime-api-expo-and-web-rtc
expo, webrtc, openai-api, openai-whisper, react-native-webrtc
1,739,942,508
se_79406597
stackoverflow
ARTIFICIAL_INTELLIGENCE
openai_api_key in docker image gives error as &quot;openai.AuthenticationError: Error code: 401 - &#39;invalid_api_key&#39;
openai_api_key in docker image gives error as &quot;openai.AuthenticationError: Error code: 401 - &#39;invalid_api_key&#39; I have a simple test code to test the OPENAI_API_KEY locally and in docker image. The application runs fine locally but for docker image run, it gives error as: "openai.AuthenticationError: Error...
https://stackoverflow.com/questions/79406597/openai-api-key-in-docker-image-gives-error-as-openai-authenticationerror-error
docker, openai-api
1,738,500,141
se_79276279
stackoverflow
ARTIFICIAL_INTELLIGENCE
Test a Perplexity API key on python
Test a Perplexity API key on python I don't find an efficient way to check if an api key of perplexity is valid, either on python or anything. Indeed, for openai I do : def check_openai_api_key(api_key): openai.api_key = api_key try: openai.Model.list() except openai.error.AuthenticationError as e:...
https://stackoverflow.com/questions/79276279/test-a-perplexity-api-key-on-python
python, openai-api, large-language-model, perplexity
1,734,029,803
se_79441829
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to use AJAX in a widget only on the admin backend?
How to use AJAX in a widget only on the admin backend? I'm trying to create a simple WordPress widget for AI text generation. The widget should allow the user to type a prompt, set a word limit, and click a "Generate Text" button. I want to use the OpenAI API to generate text based on the prompt and word limit. Howeve...
https://stackoverflow.com/questions/79441829/how-to-use-ajax-in-a-widget-only-on-the-admin-backend
javascript, php, ajax, wordpress, openai-api
1,739,635,244
se_79442207
stackoverflow
ARTIFICIAL_INTELLIGENCE
Analyzing Karate Failures with GPT as part of Github Actions workflow
Analyzing Karate Failures with GPT as part of Github Actions workflow Below is my POC of a yaml workflow that sends info about failed karate tests off to GPT for analysis and then summarizes and prints the results on the Github job summary page. It finds each failed test, gathers context, sends each summary off to GPT...
https://stackoverflow.com/questions/79442207/analyzing-karate-failures-with-gpt-as-part-of-github-actions-workflow
karate, openai-api
1,739,651,369
se_79439048
stackoverflow
ARTIFICIAL_INTELLIGENCE
OpenAI API returning parts of words as most probable token
OpenAI API returning parts of words as most probable token It is my first time working with the OpenAI API (also my first time anywhere near language models for that matter). I would like to obtain, given an uncomplete sentence missing the last word, the top words that could be used to complete it and their probabilit...
https://stackoverflow.com/questions/79439048/openai-api-returning-parts-of-words-as-most-probable-token
python, openai-api
1,739,528,657
se_79436671
stackoverflow
ARTIFICIAL_INTELLIGENCE
Error: Invalid input type &lt;class &#39;langchain_core.prompts.chat.ChatPromptTemplate&#39;&gt;. Must be a PromptValue, str, or list of BaseMessages
Error: Invalid input type &lt;class &#39;langchain_core.prompts.chat.ChatPromptTemplate&#39;&gt;. Must be a PromptValue, str, or list of BaseMessages I'm trying to make small project, which can save text from flutter app to mongo db and get text with fastAPI, make good answer with langchain openai llm. what I finally ...
https://stackoverflow.com/questions/79436671/error-invalid-input-type-class-langchain-core-prompts-chat-chatprompttemplate
fastapi, openai-api, langchain, large-language-model
1,739,459,050
se_79433457
stackoverflow
ARTIFICIAL_INTELLIGENCE
Llama-API stops working after second request
Llama-API stops working after second request I am trying to generate data based on previous texts via LLMs, and therefore making consecutive calls for all texts I have available. I have done this so far with OpenAI's and Ollama's Python libraries, and this worked very well. Since I do not have lots of computational po...
https://stackoverflow.com/questions/79433457/llama-api-stops-working-after-second-request
python, openai-api, llama
1,739,370,953