t.me/xtekky commited on
Commit
04577f5
1 Parent(s): 4cb3214

important note + new site (ora.sh)

Browse files
Files changed (1) hide show
  1. README.md +39 -0
README.md CHANGED
@@ -100,3 +100,42 @@ for response in t3nsor.StreamCompletion.create(
100
 
101
  print(response.completion.choices[0].text)
102
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
 
101
  print(response.completion.choices[0].text)
102
  ```
103
+
104
+ ### `ora` (use like openai pypi package)
105
+
106
+ example:
107
+ ```
108
+ # inport ora
109
+ import ora
110
+
111
+ # create model
112
+ model = ora.CompletionModel.create(
113
+ system_prompt = 'You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible',
114
+ description = 'ChatGPT Openai Language Model',
115
+ name = 'gpt-3.5')
116
+
117
+ # init conversation (will give you a conversationId)
118
+ init = ora.Completion.create(
119
+ model = model,
120
+ prompt = 'hello world')
121
+
122
+ print(init.completion.choices[0].text)
123
+
124
+ while True:
125
+ # pass in conversationId to continue conversation
126
+
127
+ prompt = input('>>> ')
128
+ response = ora.Completion.create(
129
+ model = model,
130
+ prompt = prompt,
131
+ conversationId = init.id)
132
+
133
+ print(response.completion.choices[0].text)
134
+ ```
135
+
136
+
137
+
138
+
139
+
140
+
141
+