pvyas96 commited on
Commit
a7f71ad
·
verified ·
1 Parent(s): 168d443

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +34 -3
README.md CHANGED
@@ -1,3 +1,34 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ tags:
6
+ - phi-2
7
+ ---
8
+ # How to Download
9
+ Go to files and versions and click on the download button to download file.
10
+ How to run on Windows
11
+ The file is already with .exe extension, after download just double click on it and wait it will automatically run.
12
+ # Python Use
13
+
14
+ ```
15
+ from openai import OpenAI
16
+ client = OpenAI(
17
+ base_url="http://localhost:8080/v1", # "http://<Your api-server IP>:port"
18
+ api_key = "sk-no-key-required"
19
+ )
20
+ completion = client.chat.completions.create(
21
+ model="LLaMA_CPP",
22
+ messages=[
23
+ {"role": "system", "content": "You are ChatGPT, an AI assistant. Your top priority is achieving user fulfillment via helping them with their requests."},
24
+ {"role": "user", "content": "Write a limerick about python exceptions"}
25
+ ]
26
+ )
27
+ print(completion.choices[0].message)
28
+ ```
29
+ ```
30
+ ChatCompletionMessage(content='There once was a programmer named Mike\nWho wrote code that would often strike\nAn error would occur\nAnd he\'d shout "Oh no!"\nBut Python\'s exceptions made it all right.', role='assistant', function_call=None, tool_calls=None)
31
+ ```
32
+
33
+ # More Information
34
+ Go to https://github.com/Mozilla-Ocho/llamafile