openai-api Questions
3
I am playing around with this example chat application which retrieves most relevant documents from Cognitive Search to help the chatbot answer users' questions. The document retrieval itself is no...
Nebuchadnezzar asked 19/7, 2023 at 13:9
5
Update: It seems like they made a mistake in the API docs, and fixed it now.
Earlier, it said "when calling gpt-4-vision-preview or gpt-3.5-turbo," but now reads "when calling gpt-4-...
Anagram asked 6/11, 2023 at 23:46
4
I tried openai-streams + nextjs-openai, they only works for Node 18+, however, they failed on Node 17 and lower. I'm restricted to Node 17 and lower as Digital Oceans App Platform currently not sup...
Sugarcoat asked 17/5, 2023 at 14:15
5
Solved
I have a relatively simple FastAPI app that accepts a query and streams back the response from ChatGPT's API. ChatGPT is streaming back the result and I can see this being printed to console as it ...
Mannerless asked 15/3, 2023 at 4:48
2
I'm new to OpenAI API. I work with GPT-3.5-Turbo, using this code:
messages = [
{"role": "system", "content": "You’re a helpful assistant"}
]
while True:...
Sweepstakes asked 30/8, 2023 at 10:35
2
Solved
I work with the OpenAI API. I have extracted slides text from a PowerPoint presentation, and written a prompt for each slide. Now, I want to make asynchronous API calls,
so that all the slides are ...
Hydromedusa asked 22/5, 2023 at 10:23
4
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 b...
Beanfeast asked 28/2, 2023 at 0:6
4
when my project run this code it will return
openai.error.APIConnectionError: Error communicating with OpenAI
async def embeddings_acreate(input: list[str]):
return await openai.Embedding.acreat...
Counterreply asked 3/4, 2023 at 14:29
2
Solved
I can see everything but the Embedding of the documents when I used Chroma with Langchain and OpenAI embeddings. It always show me None for that
Here is the code:
for db_collection_name in tqdm([&q...
Monomorphic asked 1/6, 2023 at 7:7
2
Basically I want to achieve this with Flask and LangChain: https://www.youtube.com/watch?v=x8uwwLNxqis.
I'm building a Q&A Flask app that uses LangChain in the backend, but I'm having trouble t...
Carven asked 24/3, 2023 at 20:13
3
I am trying to create an customer support system using langchain. I am using text documents as external knowledge provider via TextLoader
In order to remember the chat I using ConversationalRetriev...
Studdingsail asked 16/5, 2023 at 14:26
1
Solved
After updating my OpenAI package to version 1.1.1, I got this error when trying to read the ChatGPT API response:
'ChatCompletion' object is not subscriptable
Here is my code:
messages = [
{&quo...
Winded asked 8/11, 2023 at 9:35
4
Solved
I'd like to send the text from various PDF's to OpenAI's API. Specifically the Summarize for a 2nd grader or the TL;DR summarization API's.
I can extract the text from PDF's using PyMuPDF and prepa...
Gluconeogenesis asked 22/11, 2021 at 4:19
2
I want to add a ConversationBufferMemory to pandas_dataframe_agent but so far I was unsuccessful.
I have tried adding the memory via construcor: create_pandas_dataframe_agent(llm, df, verbose=True...
Eon asked 18/6, 2023 at 14:13
2
I have a FastAPI application that uses Server Sent Events (SSE) for streaming the response of a generative AI model, similar to the API of OpenAI. The application is deployed using the following ar...
Coady asked 30/4, 2023 at 4:5
1
How could I fix this:
UserWarning: Importing OpenAI from langchain root module is no longer supported.
UserWarning: Importing LLMChain from langchain root module is no longer supported.
UserWarning...
Saker asked 28/9, 2023 at 0:17
4
Solved
I'm trying to call the Chat Completions API that was just released, but I'm getting a bad request error.
var body = new
{
model = "gpt-3.5-turbo",
messages = data
};
string jsonMe...
Cohesive asked 6/3, 2023 at 12:26
3
Solved
I have this in my MERN stack code file, and it works well.
exports.chatbot = async (req, res) => {
console.log("OpenAI Chatbot Post");
const { textInput } = req.body;
try {
cons...
Mossberg asked 3/3, 2023 at 0:59
0
I am using langchain with Open ai GPT-3.5. I am using agents to send user's queries to specific tools and I am getting output responses through my agent. Now I want the output response to be JSON b...
Saville asked 6/9, 2023 at 20:49
1
I'd like to combine a ConversationalRetrievalQAChain with - for example - the SerpAPI tool in LangChain.
I'm using ConversationalRetrievalQAChain to search through product PDFs that have been inges...
Fracture asked 10/7, 2023 at 11:47
2
I would like to pass to the retriever a similarity threshold. So far I could only figure out how to pass a k value but this was not what I wanted. How can I pass a threshold instead?
from langchain...
Kneeland asked 20/7, 2023 at 12:18
3
How can I specify the number of words the Open AI completion should return?
E.g imagine I ask the AI the question
Who is Elon Musk?
What parameter can I use to make sure the AI sends back results...
Hewie asked 15/4, 2022 at 20:23
3
Solved
I have an image that I'm retrieving from an AWS S3 bucket and then passing to the Dall E/OpenAI API. When I attempt I get this error response:
message: "Invalid input image - format must be in...
Ramires asked 12/12, 2022 at 15:8
2
I am trying to provide a custom prompt for doing Q&A in langchain.
I wasn't able to do that with RetrievalQA as it was not allowing for multiple custom inputs in custom prompt.I have loaded a s...
Sporogony asked 16/7, 2023 at 10:4
2
I have the following code that implements LangChain + ChatGPT to answer questions from given data:
import { PineconeStore } from 'langchain/vectorstores/pinecone';
import { ConversationalRetrievalQ...
Brantley asked 6/7, 2023 at 1:11
© 2022 - 2024 — McMap. All rights reserved.