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_78463290 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to make LLMs answer in certain pattern | How to make LLMs answer in certain pattern
How can I design the LLM program so that the LLM will answer in some preset pattern?For example, if I want to use the LLM to promote some products or collect some information from the user, what adjustment should I try on the LLM program? Thx~
I tried modifying the prompts bu... | https://stackoverflow.com/questions/78463290/how-to-make-llms-answer-in-certain-pattern | nlp, artificial-intelligence, openai-api, large-language-model | 1,715,398,081 |
se_78462962 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Resolve this cryptic error to generate an image from OpenAI using JS? | Resolve this cryptic error to generate an image from OpenAI using JS?
Objective: Common Objective of Requesting and Receiving Text-To-Image Generation from OpenAI using plain JavaScript and Displaying it to the User of the Script or Program.
This is the relevant code section that was put together:
const fs = require(... | https://stackoverflow.com/questions/78462962/resolve-this-cryptic-error-to-generate-an-image-from-openai-using-js | javascript, openai-api | 1,715,385,702 |
se_78462909 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LlamaIndex how to load large .csv file for OpenAI api queries? | LlamaIndex how to load large .csv file for OpenAI api queries?
I have a create-llama app that works as expected against 100+ pages of PDF documents using SimpleDirectoryReader().loadData. However, when I attempt to load a large .csv file of (17566 tokens apparently) I receive the following error:
BadRequestError: 400 ... | https://stackoverflow.com/questions/78462909/llamaindex-how-to-load-large-csv-file-for-openai-api-queries | typescript, openai-api, llama-index | 1,715,383,713 |
se_78165764 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LangChain RAG - ChatOpenAI doesn't make a sentence when replying | LangChain RAG - ChatOpenAI doesn't make a sentence when replying
I am building a very simple rag application using Langchain. The problem I'm having is that when I use ChatOpenAI and ask a question. The model doesn't make any sentences when it answers, it doesn't behave like a "chatbot" unlike llama2 for example (... | https://stackoverflow.com/questions/78165764/langchain-rag-chatopenai-doesnt-make-a-sentence-when-replying | python, openai-api, langchain | 1,710,493,789 |
se_78457013 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ModuleNotFoundError: No module named 'langchain_openai' on using Flask | ModuleNotFoundError: No module named 'langchain_openai' on using Flask
Langchain was not recognized although I installed the necessary libraries.
I use Flask framework and want to integrate it with ChatOpenAI using Langchain.
I ran the command of langchain installation pip install langchain and pip install --u... | https://stackoverflow.com/questions/78457013/modulenotfounderror-no-module-named-langchain-openai-on-using-flask | python, flask, openai-api, langchain | 1,715,289,358 |
se_78453644 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Using nestjs and Angular, how can I stream a response from open ai? | Using nestjs and Angular, how can I stream a response from open ai?
I'm trying to create a chat bot using open ai and streaming its responses.
I have an API written with nestjs. Here is how I communicate with open ai:
public async test(): Promise<Observable<string | null>> {
return new Observable((subscriber) => {
... | https://stackoverflow.com/questions/78453644/using-nestjs-and-angular-how-can-i-stream-a-response-from-open-ai | node.js, angular, typescript, nestjs, openai-api | 1,715,248,790 |
se_78442086 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to maintain separate sessions for diff users in llama_index chat also how can we pass previous chat messages in query for future responses? | How to maintain separate sessions for diff users in llama_index chat also how can we pass previous chat messages in query for future responses?
Hi I am using llama_index for indexing hundreds of docs that contain some specific details, now I want to build an API over it(in which I would get the session_id, query_text)... | https://stackoverflow.com/questions/78442086/how-to-maintain-separate-sessions-for-diff-users-in-llama-index-chat-also-how-ca | python, chatbot, openai-api, llama, llama-index | 1,715,080,783 |
se_78439451 | stackoverflow | ARTIFICIAL_INTELLIGENCE | create_sql_agent with AzureOpenAI? | create_sql_agent with AzureOpenAI?
I have put together a script that works just fine using OpenAI api. I am now trying to switch it over to AzureOpenAI yet it seems I am running into an issue with the create_sql_agent(). Can you use create_sql_agent with AzureOpenAI model gpt-35-turbo-1106? Could it be an issue with m... | https://stackoverflow.com/questions/78439451/create-sql-agent-with-azureopenai | python, azure, openai-api, langchain, azure-openai | 1,715,036,597 |
se_77364696 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I stream an OpenAI API response back from a Svelte server to deploy on cloudflare? | How do I stream an OpenAI API response back from a Svelte server to deploy on cloudflare?
The svelte documentation says you can return a response to a post call in a +svelte.js file with
export async function POST({ request }) {
const { a, b } = await request.json();
return json(a + b);
}
But it doesn't say h... | https://stackoverflow.com/questions/77364696/how-do-i-stream-an-openai-api-response-back-from-a-svelte-server-to-deploy-on-cl | post, stream, svelte, cloudflare, openai-api | 1,698,303,004 |
se_75124685 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Unable to install tiktoken from PyPI | Unable to install tiktoken from PyPI
I am working on some OpenAI's API integrations. I am facing an issue while installing the tiktoken (a fast BPE tokeniser for use with OpenAI's models).
When I try to run on my macbook machine:
pip3 install tiktoken -v
It throws the following error (Using pip 22.3.1, error truncated... | https://stackoverflow.com/questions/75124685/unable-to-install-tiktoken-from-pypi | pypi, setup.py, openai-api | 1,673,781,903 |
se_78434891 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to prompt gpt so it does not make mistakes with time window | How to prompt gpt so it does not make mistakes with time window
I'm trying to extract property condition from estate description. In particular, any property being renovated in 2020 or above should be tagged as "JUST_RENOVATED" whereas if the renovation took place before 2020, it should simply be tagged as "GOOD".
Her... | https://stackoverflow.com/questions/78434891/how-to-prompt-gpt-so-it-does-not-make-mistakes-with-time-window | python, openai-api, large-language-model | 1,714,977,352 |
se_77388920 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based | ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based
Newbie here.
I have been trying to installen the openai library into python, but I keep running into problems. I have already installed C++ libraries.
It seems to have problems specific with aio http, and I get the error below... | https://stackoverflow.com/questions/77388920/error-could-not-build-wheels-for-aiohttp-which-is-required-to-install-pyprojec | python, python-3.x, pip, openai-api, aiohttp | 1,698,671,330 |
se_78371518 | stackoverflow | ARTIFICIAL_INTELLIGENCE | TPM limit reached when using OpenAI API and Langchain MapReduceDocumentsChain | TPM limit reached when using OpenAI API and Langchain MapReduceDocumentsChain
I'm trying to use Langchain's MapReduceDocumentsChain in combination with OpenAI's API to summarize a the content of a big document through the following chain (which was copied from Langchain's documentation):
def _create_document_summary_c... | https://stackoverflow.com/questions/78371518/tpm-limit-reached-when-using-openai-api-and-langchain-mapreducedocumentschain | python, openai-api, langchain, large-language-model | 1,713,867,056 |
se_78429669 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Learning FLask: Stuck at OpenAI api | Learning FLask: Stuck at OpenAI api
from flask import Flask, request, jsonify, send_from_directory
import openai
from openai import OpenAI
import os
app = Flask(__name__)
openai.api_key = 'sk-' # I added my key here.
@app.route('/')
def index():
return send_from_directory('.', 'index.html')
@app.route('/analy... | https://stackoverflow.com/questions/78429669/learning-flask-stuck-at-openai-api | javascript, python, flask, openai-api | 1,714,840,229 |
se_72962619 | stackoverflow | ARTIFICIAL_INTELLIGENCE | I can't modify xml files from mujoco py | I can't modify xml files from mujoco py
I want to make my custom mujoco gym env, but since it is hard, I deleted the xml script of hopper.xml and replace with the code I write. So if I do
'''
env = gym.make("Hopper-v4")
env.render()
'''
I thought I could see the xml file I write. But instead, the Hopper xml was st... | https://stackoverflow.com/questions/72962619/i-cant-modify-xml-files-from-mujoco-py | xml, openai-api, mujoco | 1,657,698,253 |
se_78418296 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API upgrade from 0.28 to 1.x | OpenAI API upgrade from 0.28 to 1.x
I am trying to upgrade the OpenAI 0.28 version to 1.2.2. For doing that I defined the client and replaced the openai chatcompletion with client.
Below is the constant file which will be used in the main file to get the keys from environment.
OPENAI_API_BASE = 'api_base'
OPENAI_API_E... | https://stackoverflow.com/questions/78418296/openai-api-upgrade-from-0-28-to-1-x | python, python-3.x, openai-api, python-class, azure-openai | 1,714,643,536 |
se_78404483 | stackoverflow | ARTIFICIAL_INTELLIGENCE | TypeError: messagesRef.current.concat is not a function | TypeError: messagesRef.current.concat is not a function
I am working on an app where you can interact ai to ask questions about the pdf you have uploaded. The issue that I'm facing is, whenever I interact with AI through the client side the follow error comes up 'TypeError: messagesRef.current.concat is not a function... | https://stackoverflow.com/questions/78404483/typeerror-messagesref-current-concat-is-not-a-function | typescript, next.js, openai-api, drizzle | 1,714,414,391 |
se_78414783 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AI based text game autocompletes user inputs prematurely | AI based text game autocompletes user inputs prematurely
I am trying to write a text-based adventure game following a YouTube tutorial here. After updating the code according to the latest documentation, I've encountered a problem where the AI responds to the inputs that should be for the player. This issue persists f... | https://stackoverflow.com/questions/78414783/ai-based-text-game-autocompletes-user-inputs-prematurely | python, openai-api, langchain, large-language-model, datastax-astra | 1,714,579,881 |
se_78413374 | stackoverflow | ARTIFICIAL_INTELLIGENCE | I keep getting Wrong API key error 403 from pinecone | I keep getting Wrong API key error 403 from pinecone
it’s my first time using VDB and I wrote some basic scraping and embedding code for the test. I can’t understand what’s wrong with API, but I keep getting the same error. Here’s my code and the output. Additionally, if you could recommend VDB for newcomers it would... | https://stackoverflow.com/questions/78413374/i-keep-getting-wrong-api-key-error-403-from-pinecone | nlp, openai-api, vector-database, pinecone | 1,714,561,403 |
se_78330110 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Adding messages to thread/run using openai-php/client, but not getting a response message | Adding messages to thread/run using openai-php/client, but not getting a response message
I've got an endpoint, which is supposed to post a message to the OpenAI API and display the response. I'm using https://github.com/openai-php/client
The code looks something like this (trimmed for brevity):
$client = OpenAI::cli... | https://stackoverflow.com/questions/78330110/adding-messages-to-thread-run-using-openai-php-client-but-not-getting-a-respons | php, openai-api | 1,713,202,133 |
se_78405495 | stackoverflow | ARTIFICIAL_INTELLIGENCE | how to configure the HTTP client in OpenAI | how to configure the HTTP client in OpenAI
The way to use httpx to create a client:
with httpx.Client(headers=headers,params=params) as client:
r = client.post(url, data=data)
However, I'd like to configure this into using openai package:
client = openai.OpenAI(api_key='...',
http_client=h... | https://stackoverflow.com/questions/78405495/how-to-configure-the-http-client-in-openai | openai-api, httpx | 1,714,431,165 |
se_78400673 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can i wait for the actual reply of an openai-assistant? (Python OpenAI API) | How can i wait for the actual reply of an openai-assistant? (Python OpenAI API)
I am interacting with the openai assistant API (python). so far, it works well. but sometimes the api returns the message i sent to the assistant instead of the assistants reply.
from openai import OpenAI
from os import environ
OPEN_API_... | https://stackoverflow.com/questions/78400673/how-can-i-wait-for-the-actual-reply-of-an-openai-assistant-python-openai-api | python, openai-api | 1,714,369,375 |
se_78136662 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Unable to find "StreamingCompletions" and "deploymentOrModelName" while consuming OPenAI in c# from azure | Unable to find "StreamingCompletions" and "deploymentOrModelName" while consuming OPenAI in c# from azure
I working with OpenAI and deployed model, while consuming the model in C# console application I am facing the issue with "StreamingCompletions" and "deploymentOrModelName". These classes are no... | https://stackoverflow.com/questions/78136662/unable-to-find-streamingcompletions-and-deploymentormodelname-while-consumin | openai-api | 1,710,088,867 |
se_77789886 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API error: "The model `text-davinci-003` has been deprecated" | OpenAI API error: "The model `text-davinci-003` has been deprecated"
I was using the ChatGPT and it says to use this line of code for the API endpoint:
$endpoint = 'https://api.openai.com/v1/engines/text-davinci-003/completions';
But it doesn't work. I get the following error:
{ "error": { "message": "The m... | https://stackoverflow.com/questions/77789886/openai-api-error-the-model-text-davinci-003-has-been-deprecated | php, openai-api, gpt-3 | 1,704,836,664 |
se_77262243 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Custom Language Model using Python3, Openai | Custom Language Model using Python3, Openai
https://medium.com/@sohaibshaheen/train-chatgpt-with-custom-data-and-create-your-own-chat-bot-using-macos-fb78c2f9646d
I was using this tutorial to create my language model. I overlooked the UPDATE notice on the bottom on my first run, so I ran into the error that got.index ... | https://stackoverflow.com/questions/77262243/custom-language-model-using-python3-openai | model, openai-api, chatgpt-api | 1,696,894,700 |
se_78398631 | stackoverflow | ARTIFICIAL_INTELLIGENCE | POST https://api.openai.com/v1/engines/gpt-3.5-turbo/completions 429 (Too Many Requests) | POST https://api.openai.com/v1/engines/gpt-3.5-turbo/completions 429 (Too Many Requests)
I am trying to use open ai api for chatGPT integration website project, i am using free trial but i use the website locally so i am the only one who sends requests, but indeed I still got that error in the console:
POST https://ap... | https://stackoverflow.com/questions/78398631/post-https-api-openai-com-v1-engines-gpt-3-5-turbo-completions-429-too-many-r | javascript, axios, openai-api | 1,714,316,888 |
se_78354136 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to Send a Streaming Response via LlamaIndex to a FastAPI Endpoint? | How to Send a Streaming Response via LlamaIndex to a FastAPI Endpoint?
I need to send a streaming response using LlamaIndex to my FastAPI endpoint. Below is the code I've written so far:
@bot_router.post("/bot/pdf_convo")
async def pdf_convo(query: QuestionInput):
chat_engine = cache["chat_engine"]
user_questi... | https://stackoverflow.com/questions/78354136/how-to-send-a-streaming-response-via-llamaindex-to-a-fastapi-endpoint | python, nlp, openai-api, large-language-model, llama-index | 1,713,534,556 |
se_78398076 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Getting XML error in chatgpt. It's not generating XML pages. It got stuck in a loop | Getting XML error in chatgpt. It's not generating XML pages. It got stuck in a loop
For three days, chatgpt is facing some glitch of not generating XML pages at all. It got stuck in a loop. What to do now?
I tried to give a simpler XML page design that contains a textview. But chatgpt still got stuck there. | https://stackoverflow.com/questions/78398076/getting-xml-error-in-chatgpt-its-not-generating-xml-pages-it-got-stuck-in-a-l | android, openai-api | 1,714,305,280 |
se_78396851 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why does langchain4j openAI api breaks while using in a Jakarta EE Rest web app? | Why does langchain4j openAI api breaks while using in a Jakarta EE Rest web app?
I am new to Jakarta EE and I am trying to build a rest based chatbot using openAI apis with langchain4j.
@Path("blockChat")
public class BlockChat {
private OpenAiChatModel chatModel;
public BlockChat(){
String apiKey = "... | https://stackoverflow.com/questions/78396851/why-does-langchain4j-openai-api-breaks-while-using-in-a-jakarta-ee-rest-web-app | java, jakarta-ee, openai-api, langchain4j | 1,714,269,118 |
se_78396568 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API in NextJS not giving a response | OpenAI API in NextJS not giving a response
I'm followed a tutorial to T but unable to get a response from the API. I'm not sure if there was an update to OpenAI API or not.
Any help will be much appreciated.
Error
http://localhost:3000/api/chat-gpt net::ERR_ABORTED 500 (Internal Server Error)
onClick @ page.tsx:13
S... | https://stackoverflow.com/questions/78396568/openai-api-in-nextjs-not-giving-a-response | javascript, typescript, next.js, openai-api | 1,714,257,186 |
se_78391442 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Chatgpt API keeps returning Error:404 Failed to get response from API | Chatgpt API keeps returning Error:404 Failed to get response from API
I am using ChatGPT's API for text classification task, which I upload a dataset and ask the ChatGPT to decide whether my text has something to do with real estate. My code is:
Basic Setup
import json
import requests
from os import getenv
# Load JSO... | https://stackoverflow.com/questions/78391442/chatgpt-api-keeps-returning-error404-failed-to-get-response-from-api | python, openai-api, chatgpt-api | 1,714,144,706 |
se_76994077 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API: How to use ChatGPT Code Interpreter through API? | OpenAI API: How to use ChatGPT Code Interpreter through API?
How to use ChatGPT Code Interpreter through API?
When this works "https://chat.openai.com/?model=gpt-4-code-interpreter"
this returns an error "there are no such model":
response = openai.Completion.create(
engine="code-interpreter", # gpt-4-code-int... | https://stackoverflow.com/questions/76994077/openai-api-how-to-use-chatgpt-code-interpreter-through-api | openai-api | 1,693,235,734 |
se_78389571 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Chain of thought prompt using OpenAI to query an order list providing incorrect answer | Chain of thought prompt using OpenAI to query an order list providing incorrect answer
I'm new to prompt engineering. I'm trying to create an AI bot to retrieve the order data based on the user's queries using OpenAI and gpt-3.5-turbo model. Below is the Python code that also contains the prompt:
from openai import Op... | https://stackoverflow.com/questions/78389571/chain-of-thought-prompt-using-openai-to-query-an-order-list-providing-incorrect | openai-api, chatgpt-api | 1,714,124,563 |
se_76070777 | stackoverflow | ARTIFICIAL_INTELLIGENCE | PowerBI Custom Visual with ChatGPT | PowerBI Custom Visual with ChatGPT
I am developing a custom visual into Power BI using TypeScript. I have an input of type text for user input prompt and an input of type text for ChatGPT answer. The idea is that the user can ask anything about report's data or any report's visual and get an answer. The visual at the ... | https://stackoverflow.com/questions/76070777/powerbi-custom-visual-with-chatgpt | typescript, powerbi, openai-api, powerbi-custom-visuals, chatgpt-api | 1,682,061,183 |
se_77592601 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why am I getting a rate limit error when I use the openai api for my first time? | Why am I getting a rate limit error when I use the openai api for my first time?
import openai
openai.api_key = "myapiKey"
completion = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Give me 3 ideas for apps I could build with openai apis "}])
print(completion.choices[0].m... | https://stackoverflow.com/questions/77592601/why-am-i-getting-a-rate-limit-error-when-i-use-the-openai-api-for-my-first-time | openai-api, chatgpt-api | 1,701,561,062 |
se_78387076 | stackoverflow | ARTIFICIAL_INTELLIGENCE | want to generate memory based rag with vector stores for storing documents | want to generate memory based rag with vector stores for storing documents
I'm working on building a memory-based chat system that utilizes vector retrieval for multiple users across multiple sessions. I'm using LangChain, OpenAI, and ChromaDB in Python.
My current implementation involves integrating LangChain's Vecto... | https://stackoverflow.com/questions/78387076/want-to-generate-memory-based-rag-with-vector-stores-for-storing-documents | python, openai-api, langchain, chromadb | 1,714,076,324 |
se_78385496 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Node.js SSL Certificate Error When Making HTTPS Requests to OpenAI API | Node.js SSL Certificate Error When Making HTTPS Requests to OpenAI API
I'm developing a Node.js application that makes API requests to OpenAI using the openai npm package. However, I'm encountering an SSL certificate error when attempting to connect to the API. Below is the error message I receive:
Error: APIConnectio... | https://stackoverflow.com/questions/78385496/node-js-ssl-certificate-error-when-making-https-requests-to-openai-api | node.js, ssl, https, certificate, openai-api | 1,714,056,961 |
se_78383619 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to Generate Text with Specific Length Using AI API | How to Generate Text with Specific Length Using AI API
I am attempting to generate text outputs that are exactly a certain number of characters or words long using AI API (OpenAI GPT, Claude, Gemini...), but I'm facing difficulties. Here's what I've tried so far:
Setting Max Tokens: I've used the max_tokens parameter ... | https://stackoverflow.com/questions/78383619/how-to-generate-text-with-specific-length-using-ai-api | python, nlp, openai-api, text-generation | 1,714,037,456 |
se_78342436 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Getting token details from Langchain/OpenAI callback handler | Getting token details from Langchain/OpenAI callback handler
I'm currently developing an application that utilizes LangChain and OpenAI's API to handle conversational interactions. The application interacts with users through a chat interface, where both user messages and bot responses are processed using OpenAI's mod... | https://stackoverflow.com/questions/78342436/getting-token-details-from-langchain-openai-callback-handler | python, openai-api, langchain, py-langchain | 1,713,370,354 |
se_77279934 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Can't instantiate abstract class CustomExtractor with abstract method class_name | Can't instantiate abstract class CustomExtractor with abstract method class_name
I am following this example from the llama_index docs:
https://github.com/run-llama/llama_index/blob/main/docs/examples/metadata_extraction/MetadataExtractionSEC.ipynb
to use a custom metadata extractor with my code like so:
from llam... | https://stackoverflow.com/questions/77279934/cant-instantiate-abstract-class-customextractor-with-abstract-method-class-name | python, openai-api, llama-index, gpt-index | 1,697,107,890 |
se_77696074 | stackoverflow | ARTIFICIAL_INTELLIGENCE | RetryError[<Future at 0x23f38d59150 state=finished raised APIRemovedInV1>] | RetryError[<Future at 0x23f38d59150 state=finished raised APIRemovedInV1>]
Trying to connect to an OpenAI api after a few months, but a RetryError[<Future at 0x23f38d59150 state=finished raised APIRemovedInV1>] error occurs. I have already searched many sites and tried many ways to solve the problem, but it is n... | https://stackoverflow.com/questions/77696074/retryerrorfuture-at-0x23f38d59150-state-finished-raised-apiremovedinv1 | python, telegram, openai-api, chatgpt-api | 1,703,139,435 |
se_78381808 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I output the results of a Python file that's in the same directory as my HTML, CSS and JS files | How do I output the results of a Python file that's in the same directory as my HTML, CSS and JS files
So I have a file called algo.py that takes user input, processes it through OpenAI and then outputs GPT's response back to the user. In the HTML file, I have a form that allows the user to input their question an... | https://stackoverflow.com/questions/78381808/how-do-i-output-the-results-of-a-python-file-thats-in-the-same-directory-as-my | javascript, python, html, node.js, openai-api | 1,714,007,048 |
se_78366358 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI ChatGPT (GPT-3.5) API error 400: Experiencing "400 Bad Request" Error when Sending Large Text Data to OpenAI API | OpenAI ChatGPT (GPT-3.5) API error 400: Experiencing "400 Bad Request" Error when Sending Large Text Data to OpenAI API
I'm facing a "400 Bad Request" issue when attempting to send large text data to the OpenAI API for processing. Here's a overview of my project:
I have a project that integrates with the Ope... | https://stackoverflow.com/questions/78366358/openai-chatgpt-gpt-3-5-api-error-400-experiencing-400-bad-request-error-whe | java, openai-api, chatgpt-api, gpt-3 | 1,713,790,048 |
se_78347352 | stackoverflow | ARTIFICIAL_INTELLIGENCE | how to make conversationalretrievalchain to include metadata in the prompt using langchain with chromadb to make the LLM aware of metadata? | how to make conversationalretrievalchain to include metadata in the prompt using langchain with chromadb to make the LLM aware of metadata?
im trying to do a bot that answer questions from a chromadb , i have stored multiple pdf files with metadata like the filename and candidate name , my problem is when i use conver... | https://stackoverflow.com/questions/78347352/how-to-make-conversationalretrievalchain-to-include-metadata-in-the-prompt-using | python, openai-api, langchain, large-language-model | 1,713,442,338 |
se_77577372 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI Assistants API error: "'Thread' object is not subscriptable" | OpenAI Assistants API error: "'Thread' object is not subscriptable"
I am trying to connect to an existing chat thread with a thread id I have stored in a json file, but I am getting an error using the retrieve command. I am doing this so that it doesn't spam and create threads every time I run my cod... | https://stackoverflow.com/questions/77577372/openai-assistants-api-error-thread-object-is-not-subscriptable | python, openai-api, openai-assistants-api | 1,701,337,345 |
se_77989391 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I extract data from a document using the OpenAI API? | How do I extract data from a document using the OpenAI API?
I want to extract key terms from rental agreements.
To do this, I want to send the PDF of the contract to an AI service that must return some key terms in JSON format.
What are some of the different libraries and companies that can do this? So far, I've explo... | https://stackoverflow.com/questions/77989391/how-do-i-extract-data-from-a-document-using-the-openai-api | python, artificial-intelligence, openai-api, openai-assistants-api | 1,707,840,812 |
se_78355357 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LLM prompt chain does not behave as expected | LLM prompt chain does not behave as expected
I'm trying to rephrase wording of an original text, and translate that into desirable language.
For that purpose, I decided to use chains on LangChain.
Although, the output is always rephrased, it is never translated.
The key code snippets are as below.
# Define the ChatPro... | https://stackoverflow.com/questions/78355357/llm-prompt-chain-does-not-behave-as-expected | python, openai-api, langchain, large-language-model | 1,713,547,732 |
se_78361880 | stackoverflow | ARTIFICIAL_INTELLIGENCE | create table of all unique options for panel design - biology research | create table of all unique options for panel design - biology research
I'm not a programmer.I'm a biologist and I have Epitopes (=the thing that can mark cells) in differen peak channel (=basically color emission detected). I have to have all my "unique" Epitope options (=I need all cell markers) but cannot have repea... | https://stackoverflow.com/questions/78361880/create-table-of-all-unique-options-for-panel-design-biology-research | r, bioinformatics, openai-api | 1,713,708,974 |
se_78356841 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Getting 404 on Openai Azure Endpoint | Getting 404 on Openai Azure Endpoint
Using the AzureOpenAi client, and getting a 404
AsyncAzureOpenAI(
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
api_version="2024-01-25-preview",
azure_deployment="XXX-staging",
azure_endpoint=os.getenv("AZURE_OPENAI_EN... | https://stackoverflow.com/questions/78356841/getting-404-on-openai-azure-endpoint | python, azure, openai-api | 1,713,580,687 |
se_77901752 | stackoverflow | ARTIFICIAL_INTELLIGENCE | 429 - Openai API Rate limit error with no usuage | 429 - Openai API Rate limit error with no usuage
I am recieving the following error. However, when I check my usuage on API dashboard, it says nothing and I have not used any credits. I am not sure why is this error occuring.. I am not even sure if the Quota resets monthly. What can I do about it?
openai.RateLimitErro... | https://stackoverflow.com/questions/77901752/429-openai-api-rate-limit-error-with-no-usuage | openai-api, rate-limiting, large-language-model, http-status-code-429 | 1,706,551,425 |
se_78333066 | stackoverflow | ARTIFICIAL_INTELLIGENCE | 'Unsupported file' error when uploading a file via streaming via the OpenAI API | 'Unsupported file' error when uploading a file via streaming via the OpenAI API
I tried to upload a file via the OpenAI API with a file path, and it worked properly, saving with the '.md' extension in storage.
Then I uploaded a file with streaming and the file has been saved as 'upload' without any extension i... | https://stackoverflow.com/questions/78333066/unsupported-file-error-when-uploading-a-file-via-streaming-via-the-openai-api | python, file-upload, streaming, openai-api | 1,713,255,129 |
se_72913212 | stackoverflow | ARTIFICIAL_INTELLIGENCE | What is the best way to make mujoco environment of my own? | What is the best way to make mujoco environment of my own?
I want to make a 3D model of reaction-wheel(https://github.com/simplefoc/Arduino-FOC-reaction-wheel-inverted-pendulum), using mujoco. And then I'll use reinforcement learning in mujoco environment to keep its balance. Is it possible to build a env like openai ... | https://stackoverflow.com/questions/72913212/what-is-the-best-way-to-make-mujoco-environment-of-my-own | xml, openai-gym, openai-api, mujoco | 1,657,291,834 |
se_78344113 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Problem parsing Open Ai's API into Zapier (Syntax Error) | Problem parsing Open Ai's API into Zapier (Syntax Error)
I havn't been on here in a while but im in a real pickle here im working on a zap that sends whatsapps of my emails summerized but for some reason i keep getting syntax errors and i cant seem to find the error i swear im not dumb ive been looking for the err... | https://stackoverflow.com/questions/78344113/problem-parsing-open-ais-api-into-zapier-syntax-error | python, openai-api, zapier | 1,713,395,804 |
se_78237430 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Integrating GPT-4 with Team Foundation Server for Data Insights | Integrating GPT-4 with Team Foundation Server for Data Insights
I'm exploring options to integrate GPT-4, the latest version of OpenAI's powerful language model, with Team Foundation Server (TFS). My objective is to leverage GPT-4's capabilities to gain insights from the data stored within our TFS environment.
I'm won... | https://stackoverflow.com/questions/78237430/integrating-gpt-4-with-team-foundation-server-for-data-insights | artificial-intelligence, openai-api, gpt-3, gpt-4 | 1,711,621,195 |
se_77605798 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I write an integration test for openai's node SDK with streaming: true using jest | How do I write an integration test for openai's node SDK with streaming: true using jest
I am having difficulty writing a test for openai's node.js SDK using the streaming: true flag.
The code that follows works great in the browser, I just wish to write a test for it.
I would like to test my whole express route, ... | https://stackoverflow.com/questions/77605798/how-do-i-write-an-integration-test-for-openais-node-sdk-with-streaming-true-us | node.js, jestjs, integration-testing, openai-api | 1,701,775,297 |
se_76572896 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to use SQLDatabaseChain from LangChain with memory? | How to use SQLDatabaseChain from LangChain with memory?
I want to create a chain to make query against my database. Also I want to add memory to this chain.
Example of dialogue I want to see:
Query: Who is an owner of website with domain domain.com?
Answer: Boba Bobovich
Query: Tell me his email
Answer: Boba Bobovich... | https://stackoverflow.com/questions/76572896/how-to-use-sqldatabasechain-from-langchain-with-memory | python, artificial-intelligence, openai-api, langchain, py-langchain | 1,687,953,125 |
se_77065143 | stackoverflow | ARTIFICIAL_INTELLIGENCE | azure gpt api stream response | azure gpt api stream response
I want to stream responce from gpt api in node.js. I can stream response from OpenAI GPT api using this code:
import OpenAI from "openai";
const openai = new OpenAI({
apiKey: 'my_api_key',
});
const response = await openai.chat.completions.create({
model: "gpt-3.5-turbo",
... | https://stackoverflow.com/questions/77065143/azure-gpt-api-stream-response | javascript, node.js, azure, openai-api | 1,694,160,097 |
se_77749571 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Python 3.7 - ModuleNotFoundError: No module named 'openai' | Python 3.7 - ModuleNotFoundError: No module named 'openai'
I am executing below Python 3.7 code:
import openai
openai.api_key = "YOUR_API_KEY"
def get_completion(prompt, model="gpt-3.5-turbo"):
messages = [{"role": "user", "content": prompt}]
response = openai.ChatCompletion.create(
model=mod... | https://stackoverflow.com/questions/77749571/python-3-7-modulenotfounderror-no-module-named-openai | python-3.x, openai-api | 1,704,252,088 |
se_76482024 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to get more detailed results sources with Langchain | How to get more detailed results sources with Langchain
I am trying to put together a simple "Q&A with sources" using Langchain and a specific URL as the source data. The URL consists of a single page with quite a lot of information on it.
The problem is that RetrievalQAWithSourcesChain is only giving me the entire UR... | https://stackoverflow.com/questions/76482024/how-to-get-more-detailed-results-sources-with-langchain | python, openai-api, gpt-3, langchain, chatgpt-api | 1,686,828,713 |
se_78337611 | stackoverflow | ARTIFICIAL_INTELLIGENCE | WARNING :Y ou exceeded your current quota, please check your plan and billing details, OpenAI API key | WARNING :Y ou exceeded your current quota, please check your plan and billing details, OpenAI API key
I am doing this :
query_engine = PandasQueryEngine(df=haa_develChronologies, verbose = True)
response = query_engine.query("provide me time stemp for observations C0392747")
Do you know how to fix it :even i paid 10$ ... | https://stackoverflow.com/questions/78337611/warning-y-ou-exceeded-your-current-quota-please-check-your-plan-and-billing-de | openai-api, langchain, large-language-model, llama-index | 1,713,307,431 |
se_78332339 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Method Not Allowed Error While trying to run a bot in discord.js | Method Not Allowed Error While trying to run a bot in discord.js
So I'm making a bot for my server that's AI powered and I'm encountring a "405: Method Not Allowed Error".
Here's my index.js code:
const fs = require('node:fs');
const path = require('node:path');
const { Client, Collection, Events, GatewayIntentBits } ... | https://stackoverflow.com/questions/78332339/method-not-allowed-error-while-trying-to-run-a-bot-in-discord-js | node.js, discord.js, openai-api | 1,713,246,031 |
se_77952637 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to use AzureChatOpenAI instead of ChatOpenAI | How to use AzureChatOpenAI instead of ChatOpenAI
In this function I want to use AzureChatOpenAI instead of ChatOpenAI tu be able to use the api keys only from azure ai
but when I try to replace it with AzureChatOpenAI it gives me this error:
raise self._make_status_error_from_response(err.response) from None
openai.No... | https://stackoverflow.com/questions/77952637/how-to-use-azurechatopenai-instead-of-chatopenai | python, azure, openai-api, azure-openai | 1,707,287,199 |
se_77606417 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAi Api request with proxy | OpenAi Api request with proxy
`I need to make a request for OpenAi by proxy.
Proxy - IPv4
Python error:
407 Proxy Authentication Required
Access to requested resource disallowed by administrator or you need valid username/password to use this resource
My code
import config
from openai import OpenAI
proxies =
{
'... | https://stackoverflow.com/questions/77606417/openai-api-request-with-proxy | python, proxy, openai-api | 1,701,781,482 |
se_78331861 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Counting Tokens with Message History in OpenAI: Correct Approach? | Counting Tokens with Message History in OpenAI: Correct Approach?
Issues Identified on the Internet:
Websites like https://tiktokenizer.vercel.app/ are useful for counting tokens, but they seem to have limitations when memory is involved in the API, especially when handling both new and old messages.
There's a discr... | https://stackoverflow.com/questions/78331861/counting-tokens-with-message-history-in-openai-correct-approach | python, token, openai-api, large-language-model, chatgpt-api | 1,713,235,222 |
se_78315891 | stackoverflow | ARTIFICIAL_INTELLIGENCE | NSwag typescript-angular problem with enum prop names and DateTIme type | NSwag typescript-angular problem with enum prop names and DateTIme type
I have a problem with generating enums and DateTime attributes using Nswag and OpenApi.
The first problem is generating Enums, I would like them to have the following format:
export enum BillboardType {
BB = 0,
BB18 = 1,
Direction = 2,... | https://stackoverflow.com/questions/78315891/nswag-typescript-angular-problem-with-enum-prop-names-and-datetime-type | c#, angular, typescript, openai-api, nswag | 1,712,920,405 |
se_78326237 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Getting embedding error while using AzureOpenAiEmbeddings with GPT-35-turbo | Getting embedding error while using AzureOpenAiEmbeddings with GPT-35-turbo
I am getting below error
The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again
I am using the code provided at this Code_link
I tried with "text-embedding-ada-002".
Below i... | https://stackoverflow.com/questions/78326237/getting-embedding-error-while-using-azureopenaiembeddings-with-gpt-35-turbo | openai-api, large-language-model, azure-openai, openaiembeddings | 1,713,159,065 |
se_76922671 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why openai key is not working in spring boot | Why openai key is not working in spring boot
@Service
public class OpenAITranslationService {
private RestTemplate restTemplate;
public OpenAITranslationService(RestTemplate restTemplate) {
this.restTemplate = restTemplate;
}
public OpenAIResponse translate(String language, String text) {
... | https://stackoverflow.com/questions/76922671/why-openai-key-is-not-working-in-spring-boot | spring, spring-boot, openai-api | 1,692,283,751 |
se_78307693 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API error: "The model gpt-3.5 does not exist or you do not have access to it" | OpenAI API error: "The model gpt-3.5 does not exist or you do not have access to it"
I have the following code:
def speakgpt():
aiactive = True
while aiactive == True:
if query[0] == 'deactivate':
aiactive = False
else:
completion = openai.ChatCompletion.create... | https://stackoverflow.com/questions/78307693/openai-api-error-the-model-gpt-3-5-does-not-exist-or-you-do-not-have-access-to | python, python-3.x, openai-api, chatgpt-api | 1,712,795,214 |
se_77831974 | stackoverflow | ARTIFICIAL_INTELLIGENCE | My query text is not recognized when building a RAG + langchain project | My query text is not recognized when building a RAG + langchain project
I'm following this tutorial made by Pixegami to create a rag for construction rules that apply to Swedish architects. And I am a beginner, so the problem might be simple and not related to the specific task of building a RAG.
Here's "my" code:
imp... | https://stackoverflow.com/questions/77831974/my-query-text-is-not-recognized-when-building-a-rag-langchain-project | python, arguments, openai-api, langchain, chromadb | 1,705,489,862 |
se_78324419 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API error: "You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 | OpenAI API error: "You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0
I am currently working on a gpt content creator system, and as I am using Mac it does not let me migrate to newer OpenAI library or downgrade it. Could I replace the ChatCompletion function with somet... | https://stackoverflow.com/questions/78324419/openai-api-error-you-tried-to-access-openai-chatcompletion-but-this-is-no-lon | python, python-2.7, openai-api, chatgpt-function-call | 1,713,110,876 |
se_78307073 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LangChain agent parsing error with structured_chat_agent and Wikipedia tool, handle_parsing_errors hits limit | LangChain agent parsing error with structured_chat_agent and Wikipedia tool, handle_parsing_errors hits limit
I am trying to ask GPT 4 to use Wikipedia for a prompt, using agents and tools via LangChain.
The difficulty I'm running into is the book I've been using, Developing Apps with GPT-4 and ChatGPT: Build Intellig... | https://stackoverflow.com/questions/78307073/langchain-agent-parsing-error-with-structured-chat-agent-and-wikipedia-tool-han | python, nlp, openai-api, langchain, large-language-model | 1,712,782,354 |
se_77998898 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Troubleshooting GPT-4 Integration with SQLDatabaseToolkit and create_sql_agent for Prompt Passing Error | Troubleshooting GPT-4 Integration with SQLDatabaseToolkit and create_sql_agent for Prompt Passing Error
I was previously using SQLDatabaseChain to connect LLM (Language Model) with my database, and it was functioning correctly with GPT-3.5. However, when attempting the same process with GPT-4, I encountered an error s... | https://stackoverflow.com/questions/77998898/troubleshooting-gpt-4-integration-with-sqldatabasetoolkit-and-create-sql-agent-f | openai-api, prompt, langchain, gpt-4, mssql-tools | 1,707,980,634 |
se_78128795 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why does Langchain SQLDatabase connection detects only a few of existing tables? | Why does Langchain SQLDatabase connection detects only a few of existing tables?
I have successfully connected to a Redshift database like below and got all the table names;
conn = psycopg2.connect(host,db,port,username,password)
cursor.execute("SELECT tablename FROM pg_tables GROUP BY tablename ORDER BY tablename")
... | https://stackoverflow.com/questions/78128795/why-does-langchain-sqldatabase-connection-detects-only-a-few-of-existing-tables | sql, sqlalchemy, amazon-redshift, openai-api, langchain | 1,709,912,476 |
se_78299790 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Python already installed still getting error "Unable to process..." while creating new environment in anaconda prompt | Python already installed still getting error "Unable to process..." while creating new environment in anaconda prompt
Tried to change the python version to 3.8 but still facing the same issue.
Thanks in advance!!
Tried to create a new environment to test open ai api key but showing error(shared screenshot ab... | https://stackoverflow.com/questions/78299790/python-already-installed-still-getting-error-unable-to-process-while-creati | python, package, version, openai-api | 1,712,678,692 |
se_78309394 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I make the text bold and have space in between in tkinter python? | How do I make the text bold and have space in between in tkinter python?
In my code, I only want to make the sender name bold. This means I only want to make "User" and "Gpt-3.5-turbo" bold. For some reason, messages sent by "User" is always bold. Additionally, there is no new line between "User" and "Gpt-3.5-turbo" a... | https://stackoverflow.com/questions/78309394/how-do-i-make-the-text-bold-and-have-space-in-between-in-tkinter-python | python, tkinter, openai-api, tkinter-entry, tkinter-layout | 1,712,827,997 |
se_76622250 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Django StreamingHttpResponse not streaming on production API | Django StreamingHttpResponse not streaming on production API
I'm trying to stream an OpenAI response from a Django server to the browser.
I have a view in Django that looks like this (assume that generate_thing returns a stream from OpenAI):
@api_view(['POST'])
def generate(request):
data = json.loads(request.body... | https://stackoverflow.com/questions/76622250/django-streaminghttpresponse-not-streaming-on-production-api | python, django, amazon-ec2, django-rest-framework, openai-api | 1,688,573,988 |
se_78301829 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Inconsistencies between Azure OpenAI Chat Playground and .NET API Outputs | Inconsistencies between Azure OpenAI Chat Playground and .NET API Outputs
I've been working on a project recently, where the goal is to extract the main topic mentioned multiple times in a given text. To achieve this, I've been using a consistent prompt with the same set of parameters in two environments: the Azure Op... | https://stackoverflow.com/questions/78301829/inconsistencies-between-azure-openai-chat-playground-and-net-api-outputs | openai-api, azure-openai, azure-ai | 1,712,714,675 |
se_77839828 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI Assistants API: Why does a single question I ask my assistant spend so many tokens? | OpenAI Assistants API: Why does a single question I ask my assistant spend so many tokens?
I have a NodeJS program that connects to OpenAI's assistant API to create messages. I have followed this documentation from OpenAI to create the steps below:
I have created an Assistant (gpt-4-1106-preview) and a thread in that... | https://stackoverflow.com/questions/77839828/openai-assistants-api-why-does-a-single-question-i-ask-my-assistant-spend-so-ma | openai-api, gpt-4, openai-assistants-api | 1,705,585,157 |
se_78301939 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Having trouble using OpenAI API | Having trouble using OpenAI API
I am having trouble with this code. I want to implement AI using OpenAI API in my React.js project but I cannot seem to get what the issue is. I ask it a question in the search bar in my project and it says "No response from AI". There is more to it but this is just what I think is havi... | https://stackoverflow.com/questions/78301939/having-trouble-using-openai-api | reactjs, node.js, openai-api | 1,712,717,980 |
se_76944115 | stackoverflow | ARTIFICIAL_INTELLIGENCE | "Axios POST Request to API Endpoint Results in Internal Server Error 500" | "Axios POST Request to API Endpoint Results in Internal Server Error 500"
Here is the github repository
HERE IS THE SCREENSHOT OF THE ERROR SHOWN IN THE CONSOLE
Problem:
When making a POST request to the /api/conversation endpoint in my Next.js application using Axios, I consistently receive an "Internal Ser... | https://stackoverflow.com/questions/76944115/axios-post-request-to-api-endpoint-results-in-internal-server-error-500 | reactjs, typescript, next.js, axios, openai-api | 1,692,611,012 |
se_78297506 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why does my console keep bringing up a 'method (405) not allowed' in my deployed app? | Why does my console keep bringing up a 'method (405) not allowed' in my deployed app?
I recently developed a weather prediction app that uses OpenAI's gpt-3.5-turbo.
When I run it in my local environment, it works perfectly, but when I deploy to either Vercel, Netlify, or Cloudflare, it does not work. It print... | https://stackoverflow.com/questions/78297506/why-does-my-console-keep-bringing-up-a-method-405-not-allowed-in-my-deployed | javascript, python, html, openai-api | 1,712,655,610 |
se_76293370 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Openai Module Not Found | Openai Module Not Found
OpenAi Module not loading
I have installed the OpenAi module to my raspberry pi and am using some Python code to access it. From the terminal it works fine. I wanted to call the Python code from a PHP page using shell_exec to retrieve the answer. However, the Python code cannot find the openai ... | https://stackoverflow.com/questions/76293370/openai-module-not-found | python, apache, module, openai-api | 1,684,552,029 |
se_78287802 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Document search with Azure OpenAI and FAISS is not working | Document search with Azure OpenAI and FAISS is not working
I am trying to create vector index using FAISS but I am either gettingerror :
AttributeError: 'str' object has no attribute 'create'
OR
NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
from langchain.embeddings.opena... | https://stackoverflow.com/questions/78287802/document-search-with-azure-openai-and-faiss-is-not-working | openai-api, large-language-model, azure-openai, faiss | 1,712,493,112 |
se_78235199 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Unable to Save Generated Data to JSONL File - Always Resulting in "Wrote 0 examples to finetuning_events.jsonl" Message | Unable to Save Generated Data to JSONL File - Always Resulting in "Wrote 0 examples to finetuning_events.jsonl" Message
Issue Description
When attempting to generate JSONL data using Llama Index, the process works well until the final step where the results are saved to a JSONL file. However, every time I tr... | https://stackoverflow.com/questions/78235199/unable-to-save-generated-data-to-jsonl-file-always-resulting-in-wrote-0-examp | openai-api, llama-index, fine-tuning | 1,711,584,251 |
se_78288435 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LangSmith-OpenAI- "Inaccurate API key" | LangSmith-OpenAI- "Inaccurate API key"
I've been using Langchain and Langsmith to create a benchmarking workflow for my LLM prompts.
Everything's been working well, until I had to delete are re-create my OpenAI API key.
I've updated the API key in the env.py as the main environmental variable, and this works... | https://stackoverflow.com/questions/78288435/langsmith-openai-inaccurate-api-key | python, openai-api, langchain, large-language-model | 1,712,505,600 |
se_78287402 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Connect to own api based on booking ID | Connect to own api based on booking ID
We are investigating the openai API for building a support desk. Is it possible to add some kind of routes based on keywords in dialog ? By example when user asked a question about their booking we call our own endpoint API (not openai) to fetch the status of the booking ?
Bes... | https://stackoverflow.com/questions/78287402/connect-to-own-api-based-on-booking-id | openai-api | 1,712,483,957 |
se_78286602 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Running HTML&JavaScript locally gets this error: TypeError: Module name, 'openai' does not resolve to a valid URL | Running HTML&JavaScript locally gets this error: TypeError: Module name, 'openai' does not resolve to a valid URL
I'm new to web dev and is following a tutorial on how to develop a web app using OpenAI API. The author runs the code in the course env called scrimba, while I'm developing on my MacBook.
This ... | https://stackoverflow.com/questions/78286602/running-htmljavascript-locally-gets-this-error-typeerror-module-name-openai | javascript, node.js, express, openai-api | 1,712,462,410 |
se_78284714 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to fix InvalidRequestError: The model `text-davinci-003` has been deprecated, learn more here: https://platform.openai.com/docs/deprecations | How to fix InvalidRequestError: The model `text-davinci-003` has been deprecated, learn more here: https://platform.openai.com/docs/deprecations
I am making a PDF chatbot using openai and langchain, I am facing this
InvalidRequestError: The model text-davinci-003 has been deprecated, learn more here: https://platform.... | https://stackoverflow.com/questions/78284714/how-to-fix-invalidrequesterror-the-model-text-davinci-003-has-been-deprecated | chatbot, openai-api, large-language-model | 1,712,413,157 |
se_76363168 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI API: How do I handle errors in Python? | OpenAI API: How do I handle errors in Python?
I tried using the below code, but the OpenAI API doesn't have the AuthenticationError method in the library. How can I effectively handle such error.
import openai
# Set up your OpenAI credentials
openai.api_key = 'YOUR_API_KEY'
try:
# Perform OpenAI API request
... | https://stackoverflow.com/questions/76363168/openai-api-how-do-i-handle-errors-in-python | python, openai-api, gpt-3, chatgpt-api, gpt-4 | 1,685,436,895 |
se_78282380 | stackoverflow | ARTIFICIAL_INTELLIGENCE | What is the OpenAI Chat Completion API tools/functions property format? | What is the OpenAI Chat Completion API tools/functions property format?
Is there any clear documentation on the format of OpenAI's Chat Completion API tools/functions object format? I understand it's JSON, but there appear to be underlying requirements of what property names/types are allowed inside of the objects.
I ... | https://stackoverflow.com/questions/78282380/what-is-the-openai-chat-completion-api-tools-functions-property-format | json, openai-api | 1,712,351,638 |
se_78281880 | stackoverflow | ARTIFICIAL_INTELLIGENCE | "TypeError: 'ChatCompletion' object is not subscriptable" error | "TypeError: 'ChatCompletion' object is not subscriptable" error
Running next code and got an error. Help me please to fix! Thanks in advance
Here is my code:
def get_completion_and_token_count(messages,
model="gpt-3.5-turbo",
tem... | https://stackoverflow.com/questions/78281880/typeerror-chatcompletion-object-is-not-subscriptable-error | python, artificial-intelligence, openai-api | 1,712,343,428 |
se_78280330 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LangChain Sequential Chaining with LCEL | LangChain Sequential Chaining with LCEL
I'm currently envisioning to build a kind of writing engine to automate iterations and prompts I would have done manually before. For this, I would like to use OpenAI + LangChain.
I read a lot and have a "working" prototype but still struggle to understand if it's the right way ... | https://stackoverflow.com/questions/78280330/langchain-sequential-chaining-with-lcel | artificial-intelligence, openai-api, langchain | 1,712,324,588 |
se_74000154 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I make sure answers are from a customized (fine-tuning) dataset? | How do I make sure answers are from a customized (fine-tuning) dataset?
I'm using customized text with 'Prompt' and 'Completion' to train new model.
Here's the tutorial I used to create customized model from my data:
beta.openai.com/docs/guides/fine-tuning/advanced-usage
However even after training the model and sendi... | https://stackoverflow.com/questions/74000154/how-do-i-make-sure-answers-are-from-a-customized-fine-tuning-dataset | nlp, customization, openai-api, gpt-3 | 1,665,259,087 |
se_77922637 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ImportError: cannot import name 'OpenAI' from 'openai' | ImportError: cannot import name 'OpenAI' from 'openai'
After the latest OpenAI deprecations in early Jan this year, I'm trying to convert from the older API calls to the newer ones. (openai==0.28.0 to 1.10.0)
After switching to the new functions I always get one error: ImportError: cannot import name '... | https://stackoverflow.com/questions/77922637/importerror-cannot-import-name-openai-from-openai | python, openai-api, chatgpt-api | 1,706,813,057 |
se_78266194 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to deploy mlflow's new prompt engineering UI | How to deploy mlflow's new prompt engineering UI
I'm running into issues deploying mlflow's new prompt engineering UI. I've followed these directions: https://mlflow.org/docs/latest/llms/prompt-engineering/index.html
# saved as config.yaml in directory
endpoints:
- name: chat
endpoint_type: llm/v1/chat
m... | https://stackoverflow.com/questions/78266194/how-to-deploy-mlflows-new-prompt-engineering-ui | terminal, yaml, openai-api, mlflow | 1,712,131,639 |
se_78269598 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langchain, call open AI | Langchain, call open AI
I am following quick start of Langchain to call open ai for LLM.
https://python.langchain.com/docs/get_started/quickstart
While running the below python code I am getting error.
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.out... | https://stackoverflow.com/questions/78269598/langchain-call-open-ai | openai-api, langchain | 1,712,166,888 |
se_78270314 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to do a text ChatGPT-like text prompt in bigquery | How to do a text ChatGPT-like text prompt in bigquery
Take the following prompt from ChatGPT to provide context:
Is there a (simple) way in BigQuery to construct a ChatGPT-like response based on data in the row? As a simplistic example:
with tbl as (
select "Mike" as first_name, "Davis" as last_name, "Dinner" as ev... | https://stackoverflow.com/questions/78270314/how-to-do-a-text-chatgpt-like-text-prompt-in-bigquery | sql, google-bigquery, openai-api, large-language-model, google-gemini | 1,712,175,614 |
se_78269557 | stackoverflow | ARTIFICIAL_INTELLIGENCE | VectorStoreIndex API Key while using AzureOpenAI Service | VectorStoreIndex API Key while using AzureOpenAI Service
I'm trying to use VectorStoreIndex from llama_index solving the RAG problem for chatbot just the following way:
import openai
from llama_index import VectorStoreIndex
index = VectorStoreIndex.from_documents(docs)
index.storage_context.persist()
When I read doc... | https://stackoverflow.com/questions/78269557/vectorstoreindex-api-key-while-using-azureopenai-service | azure, openai-api, azure-openai, llama, llama-index | 1,712,166,474 |
se_77642444 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can you use an already created chromadb collection with a LLM using openai and langchain? | How can you use an already created chromadb collection with a LLM using openai and langchain?
I already have a chromadb collection created with its documents and metadata.
The problem is when I want to use langchain to create a llm and pass this chromadb collection to use as a knowledge base.
langchain_chroma = Chroma... | https://stackoverflow.com/questions/77642444/how-can-you-use-an-already-created-chromadb-collection-with-a-llm-using-openai-a | python, machine-learning, nlp, openai-api, langchain | 1,702,329,443 |
se_77682967 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to use the max number of tokens with the openai api? | How to use the max number of tokens with the openai api?
I want to extract ("parse out") some text from some "unstructured data". So the only robust way I've found to do this is using GPT4. When I try it on ChatGPT (with GPT4) web interface it works -- though because it's a lot of text I do have to click the continuat... | https://stackoverflow.com/questions/77682967/how-to-use-the-max-number-of-tokens-with-the-openai-api | openai-api | 1,702,961,449 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.