openai-api Questions

1

I'm using LangChain to build a NL application. I want the interactions with the LLM to be recorded in a variable I can use for logging and debugging purposes. I have created a very simple chain: fr...
Beck asked 8/6, 2023 at 14:36

2

Im creating a text document QA chatbot, Im using Langchainjs along with OpenAI LLM for creating embeddings and Chat and Pinecone as my vector Store. See Diagram: After successfully uploading embed...
Stout asked 18/6, 2023 at 18:41

4

I am using chat gpt api on my react application. The problem i am facing is how to format the response coming from chat gpt. If is ask it to give me a response in table format it provides wei...
Decretory asked 30/4, 2023 at 17:40

3

Solved

By using sessions, developers can build chat applications that maintain context across multiple interactions with the user, which can lead to more engaging and natural conversations. The question: ...
Guileless asked 18/3, 2023 at 22:45

5

Solved

I would like to get the text inside this data structure that is outputted via GPT3 OpenAI. I'm using Python. When I print the object I get: <OpenAIObject text_completion id=cmpl-6F7ScZDu2UKKJGPX...
Clubman asked 21/11, 2022 at 20:26

9

Solved

I'm trying to follow the fine tuning guide for Openai here. I ran: pip install --upgrade openai Which install without any errors. But even after restarting my terminal, i still get zsh: command no...
Goldschmidt asked 31/7, 2022 at 19:28

5

Solved

I'm trying OpenAI. I have prepared the training data, and used fine_tunes.create. Several minutes later, it showed Stream interrupted (client disconnected). $ openai api fine_tunes.create -t data_p...
Keen asked 3/12, 2022 at 11:24

2

I keep get an error as below Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=600) when I run the code below def generate_gpt3_response(user_te...
Zecchino asked 20/3, 2023 at 7:43

7

class OpenaiClassifier(): def __init__(self, api_keys): openai.api_key = api_keys['Openai'] def get_ratings(self, review): prompt = f"Rate the following review as an integer from 1 to 5, ...
Avraham asked 7/5, 2023 at 6:29

0

I am using Langchain to interact with a long piece of text. The text is split into chunks, which are passed in as the docs variable below. I have set up a chain that streams my response, however I ...
Griseous asked 28/7, 2023 at 21:37

0

We're prototyping a chatbot application using Azure OpenAI gpt-3.5-turbo model using the standard tier. We're facing random latency bursts, which sometimes go between 3-20 minutes. Below I have scr...
Archduke asked 28/7, 2023 at 8:58

0

I want to query my mongo collection using LangChain. Just like we have SQLDatabaseChain in LangChain to connect with a SQL database such as Postgres, do we have something similar to connect with a ...
Rajasthan asked 26/7, 2023 at 8:36

2

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 =...

1

I am fairly new to using llama-index library for training GPT-3 as well as using ChatGPT through the standard API (both in Python). I have noticed that standard ChatGPT API i could simply do the fo...
Informed asked 10/4, 2023 at 18:45

4

Solved

I'm able to use the gpt-3.5-turbo-0301 model to access the ChatGPT API, but not any of the gpt-4 models. Here is the code I am using to test this (it excludes my openai API key). The code runs as w...
Apotropaic asked 18/3, 2023 at 3:59

4

Solved

How do i add memory to RetrievalQA.from_chain_type? or, how do I add a custom prompt to ConversationalRetrievalChain? For the past 2 weeks ive been trying to make a chatbot that can chat over docum...

2

In OpenAI API, how to programmatically check if the response is incomplete? If so, you can add another command like "continue" or "expand" or programmatically continue it perfec...

3

Solved

I just have a newly created Environment in Anaconda (conda 22.9.0 and Python 3.10.10). Then I proceed to install langchain (pip install langchain if I try conda install langchain it does not work)....
Loosetongued asked 28/3, 2023 at 8:44

5

I don't understand why I am receiving this error. Refused to set unsafe header "User-Agent" I am trying to use OpenAI's API for a personal project. I don't understand why it's refusing ...
Rid asked 21/5, 2022 at 1:59

1

Solved

Whats the recommended way to define an output schema for a nested json, the method I use doesn't feel ideal. # adding to planner -> from langchain.experimental.plan_and_execute import load_chat_...
Clinch asked 5/6, 2023 at 15:11

1

Solved

I'm just getting started with working with LLMs, particularly OpenAIs and other OSS models. There are a lot of guides on using LlamaIndex to create a store of all your documents and then query on t...

2

Langchain have added this function ConversationalRetrievalChain which is used to chat over docs with history. According to their documentation here ConversationalRetrievalChain I need to pass promp...
Sialoid asked 4/5, 2023 at 15:49

5

I’m trying to use LangChain’s AzureOpenAI as below but getting this error. Do you know how can I fix this? openai.error.InvalidRequestError: Resource not found # Import Azure OpenAI from langchain....
Cassady asked 19/4, 2023 at 1:13

4

Solved

I was trying this code given in OpenAI. Link:- API for text generation Code import openai prompt = """We’re releasing an API for accessing new AI models developed by OpenAI. Unlike ...
Tip asked 11/1, 2021 at 13:39

4

Solved

I am currently trying to use OpenAI's most recent model: gpt-3.5-turbo. I am following a very basic tutorial. I am working from a Google Collab notebook. I have to make a request for each prompt in...
Woolfell asked 2/3, 2023 at 15:55

© 2022 - 2024 — McMap. All rights reserved.