openai-api Questions
2
As far as I can see the only options currently for copilot/ChatGPT SQL assistance is to generate queries outside of SSMS.
The real power would be within the SSMS, with access to table definitions, ...
Emblem asked 9/6, 2023 at 1:27
4
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.
Allanallana asked 15/5, 2023 at 16:45
2
Solved
I'm trying to build a ChatGPT website clone and now I need to make the stream completion effect that shows the result word-per-word.
My server is a TypeScript Node.js app that uses the Express.js f...
F asked 29/4, 2023 at 19:15
2
Solved
I am using the SQL Database Agent to query a postgres database. I want to use gpt 4 or gpt 3.5 models in the OpenAI llm passed to the agent, but it says I must use ChatOpenAI. Using ChatOpenAI thro...
Pasadis asked 7/6, 2023 at 9:40
13
I'm trying to build a discord bot that uses the GPT-4 API to function as a chatbot on discord. I have the most recent version of the OpenAI library but when I run my code it tells me "An error...
Letdown asked 28/3, 2023 at 0:33
8
this is my code:
import os
from dotenv import load_dotenv,find_dotenv
load_dotenv(find_dotenv())
print(os.environ.get("OPEN_AI_KEY"))
from langchain.llms import OpenAI
llm=OpenAI(model_...
Exhilaration asked 31/7, 2023 at 2:38
4
Solved
OpenAI's text models have a context length, e.g.: Curie has a context length of 2049 tokens.
They provide max_tokens and stop parameters to control the length of the generated sequence. Therefore t...
Equilibrium asked 21/3, 2023 at 17:35
2
Solved
I try to load a dataset using the datasets python module in my local Python Notebook. I am running a Python 3.10.13 kernel as I do for my virtual environment.
I cannot load the datasets I am follow...
Godunov asked 6/11, 2023 at 17:29
4
OpenAI API error: "Module 'openai' has no exported member 'Configuration'"
I'm trying to do an API call to the GPT-3.5 API, but anything imported from OpenAI is giving me a has no exported member error.
import { Configuration, OpenAIApi } from "openai";
import {...
Sphacelus asked 16/8, 2023 at 22:53
6
https://pypi.org/project/openai/
"The library needs to be configured with your account's secret key which
is available on the
website. [...] Set it as
the OPENAI_API_KEY environment variable...
Jaunty asked 21/6, 2023 at 11:16
9
import discord
import openai
import os
openai.api_key = os.environ.get("OPENAI_API_KEY")
#Specify the intent
intents = discord.Intents.default()
intents.members = True
#Create Client
...
Coloquintida asked 18/3, 2023 at 9:11
5
i have built a splitter function with langchain library that splits a series of python files.
At another point in the code I need to convert these documents back into python code. Only I do not kno...
Mourner asked 1/9, 2023 at 20:27
3
I'm trying to write prompts for chatGPT API. I want it to respond with purely machine readable JSON responses containing information I want.
I want it to appraise a description of a project, and in...
Nutrilite asked 5/5, 2023 at 20:8
2
I try to call AzureChatOpenAI() from langchain. Normally I would do:
model = AzureChatOpenAI(
openai_api_base=os.getenv("OPENAI_API_BASE"),
openai_api_version="2023-03-15-preview&quo...
Cheyney asked 25/11, 2023 at 17:10
2
My business handles a variety of entities (job, invoice, quote, resource, vehicle, contact, person, message, alert, etc.).
My goal is to use OpenAI function calling to allow my users to ask "a...
Counterpoise asked 14/9, 2023 at 8:5
2
Solved
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 ht...
Duplessis asked 30/10, 2023 at 13:8
1
I have built my own GPT using ChatGPT, and the same has been made public on some URL. I am unable to find a way to make API calls to my own GPT that is created through ChatGPT. Is such functionalit...
Hominy asked 21/1 at 12:57
8
I want to use openai.embeddings_utils import get_embeddings
So already install openai
Name: openai
Version: 0.26.5
Summary: Python client library for the OpenAI API
Home-page: https://github.com/op...
Volding asked 9/2, 2023 at 4:16
5
We have a use case for ChatGPT in summarizing long pieces of text (speech-to-text conversations which can be over an hour).
However we find that the 4k token limit tends to lead to a truncation of ...
Mainmast asked 6/3, 2023 at 6:23
3
Please bear with me as this is literally the first major code I have ever written and its for OpenAI's ChatGPT API.
What I intend to do with this code is load a pdf document or a group of pdf docum...
Openhearth asked 21/5, 2023 at 21:9
15
Solved
After pip install openai, when I try to import openai, it shows this error:
the 'ssl' module of urllib3 is compile with LibreSSL not OpenSSL
I just followed a tutorial on a project about using AP...
Cyler asked 6/5, 2023 at 5:11
2
I'm trying to build a chatbot that can chat about pdfs, and I got it working with memory using ConversationBufferMemory and ConversationalRetrievalChain like in this example. https://python.langcha...
Loupe asked 5/5, 2023 at 4:58
4
Solved
I use OpenAI's Whisper python lib for speech recognition. How can I get word-level timestamps?
To transcribe with OpenAI's Whisper (tested on Ubuntu 20.04 x64 LTS with an Nvidia GeForce RTX 3090):...
Electrostatics asked 23/9, 2022 at 2:15
3
Solved
Below is some code for a simple Firebase Cloud Function that hits the ChatGPT API. Deploying this code and accessing it from my app results in a CORS error.
import * as functions from "firebas...
Countryman asked 4/3, 2023 at 17:54
2
I am relatively new to the OpenAI API and am trying to obtain my rate limits through the HTTP headers of the response, as discussed https://platform.openai.com/docs/guides/rate-limits/usage-tiers?c...
Taxi asked 5/12, 2023 at 11:2
© 2022 - 2024 — McMap. All rights reserved.