py-llama predictor

This commit is contained in:
Dobromir Popov
2024-03-06 15:38:25 +02:00
parent de62e22220
commit ceaf3fbf78
7 changed files with 532 additions and 0 deletions

47
doc/oi-notes.md Normal file
View File

@ -0,0 +1,47 @@
interpreter --api_base http://192.168.0.11:11434/v1/
interpreter --model "gpt-3.5-turbo" # mistral
interpreter --model "mistral" --api_base http://192.168.0.11:11434/v1/
Mac/Linux: 'export OPENAI_API_KEY=your-key-here',
Windows: 'setx OPENAI_API_KEY your-key-here' then restart terminal.
interpreter --local
interpreter --api_base http://192.168.0.11:11434/v1 --api_key "" --model openai/local
interpreter --api_base http://192.168.0.137:1234/v1 --api_key "" --model openai/local
192.168.0.137
# Load a model, start the server, and run this example in your terminal
# Choose between streaming and non-streaming mode by setting the "stream" field
curl http://192.168.0.11:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [
{ "role": "system", "content": "Always answer in rhymes." },
{ "role": "user", "content": "Introduce yourself." }
],
"temperature": 0.7,
"max_tokens": -1,
"stream": false
}'
curl http://192.168.0.137:1234/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [
{ "role": "system", "content": "Always answer in rhymes." },
{ "role": "user", "content": "Introduce yourself." }
],
"temperature": 0.7,
"max_tokens": -1,
"stream": false
}'