mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-08-17 15:37:07 +00:00
Update gpt4all_chat.md (#598)
Signed-off-by: Andriy Mulyar <andriy.mulyar@gmail.com>
This commit is contained in:
parent
e424f9bd5a
commit
8e3728f60e
@ -24,11 +24,7 @@ import openai
|
|||||||
openai.api_base = "http://localhost:4891/v1"
|
openai.api_base = "http://localhost:4891/v1"
|
||||||
#openai.api_base = "https://api.openai.com/v1"
|
#openai.api_base = "https://api.openai.com/v1"
|
||||||
|
|
||||||
# Read the OpenAI API key from an environment variable (not needed if using local LLM)
|
openai_api_key = "no needed for a local LLM"
|
||||||
openai_api_key = os.environ.get("OPENAI_API_KEY")
|
|
||||||
if not openai_api_key:
|
|
||||||
raise ValueError("Please set the 'OPENAI_API_KEY' environment variable.")
|
|
||||||
openai.api_key = openai_api_key
|
|
||||||
|
|
||||||
# Set up the prompt and other parameters for the API request
|
# Set up the prompt and other parameters for the API request
|
||||||
prompt = "Who is Michael Jordan?"
|
prompt = "Who is Michael Jordan?"
|
||||||
|
Loading…
Reference in New Issue
Block a user