Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-09-2023, 14:39
blue_devil's Avatar
blue_devil blue_devil is offline
Family
 
Join Date: Dec 2011
Location: Observable Universe
Posts: 537
Rept. Given: 110
Rept. Rcvd 73 Times in 46 Posts
Thanks Given: 687
Thanks Rcvd at 895 Times in 297 Posts
blue_devil Reputation: 73
ChatGPT from your command prompt: llm

A CLI utility and Python library for interacting with Large Language Models, both via remote APIs and models that can be installed and run on your own machine.

REPO:
Code:
https://github.com/simonw/llm
DOCS:
Code:
https://llm.datasette.io/en/stable/
INSTALL:

Code:
pip install llm
or
Code:
python -m pip install llm
USAGE:
Obtain a chatgpt/openai API key from their site. You need to register to openai. When you set your api to llm you can use chatgpt from commmand prompt:

Code:
# Paste your OpenAI API key into this
llm keys set openai

# Run a prompt
llm "Ten fun names for a pet pelican"

# Run a system prompt against a file
cat myfile.py | llm -s "Explain this code"
My experience after setting open ai api:
Code:
$ llm "Ten fun names for a pet pelican"
Error: You exceeded your current quota, please check your plan and billing details.

Last edited by blue_devil; 11-09-2023 at 14:39. Reason: typo
Reply With Quote
The Following User Says Thank You to blue_devil For This Useful Post:
dotdll (07-16-2025)
 

Tags
chatgpt, openai


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT +8. The time now is 19:40.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )