summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-09-23 12:20:25 +0200
committerGitHub <noreply@github.com>2023-09-23 12:20:25 +0200
commit4b9504dbcd19143777a01b73381a38a9a6ac272e (patch)
tree12c9427d7ea306f5756be1159ffd9a0fc9b0f62f /README.md
parent~ | improve Vercel & g4f.Completion.create (diff)
downloadgpt4free-4b9504dbcd19143777a01b73381a38a9a6ac272e.tar
gpt4free-4b9504dbcd19143777a01b73381a38a9a6ac272e.tar.gz
gpt4free-4b9504dbcd19143777a01b73381a38a9a6ac272e.tar.bz2
gpt4free-4b9504dbcd19143777a01b73381a38a9a6ac272e.tar.lz
gpt4free-4b9504dbcd19143777a01b73381a38a9a6ac272e.tar.xz
gpt4free-4b9504dbcd19143777a01b73381a38a9a6ac272e.tar.zst
gpt4free-4b9504dbcd19143777a01b73381a38a9a6ac272e.zip
Diffstat (limited to '')
-rw-r--r--README.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md
index c9a77e7c..086fc427 100644
--- a/README.md
+++ b/README.md
@@ -133,6 +133,7 @@ docker compose down
### The `g4f` Package
+#### ChatCompletion
```py
import g4f
@@ -171,7 +172,25 @@ response = g4f.ChatCompletion.create(
for message in response:
print(message)
```
+##### Completion
+```py
+import g4f
+
+allowed_models = [
+ 'code-davinci-002',
+ 'text-ada-001',
+ 'text-babbage-001',
+ 'text-curie-001',
+ 'text-davinci-002',
+ 'text-davinci-003'
+]
+response = g4f.Completion.create(
+ model = 'text-davinci-003',
+ prompt = 'say this is a test')
+
+print(response)
+```
##### Providers:
```py