summaryrefslogtreecommitdiffstats
path: root/g4f/.v1/gpt4free/gptworldAi/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/.v1/gpt4free/gptworldAi/README.md')
-rw-r--r--g4f/.v1/gpt4free/gptworldAi/README.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/g4f/.v1/gpt4free/gptworldAi/README.md b/g4f/.v1/gpt4free/gptworldAi/README.md
new file mode 100644
index 00000000..a6b07f86
--- /dev/null
+++ b/g4f/.v1/gpt4free/gptworldAi/README.md
@@ -0,0 +1,25 @@
+# gptworldAi
+Written by [hp_mzx](https://github.com/hpsj).
+
+## Examples:
+### Completion:
+```python
+for chunk in gptworldAi.Completion.create("你是谁", "127.0.0.1:7890"):
+ print(chunk, end="", flush=True)
+ print()
+```
+
+### Chat Completion:
+Support context
+```python
+message = []
+while True:
+ prompt = input("请输入问题:")
+ message.append({"role": "user","content": prompt})
+ text = ""
+ for chunk in gptworldAi.ChatCompletion.create(message,'127.0.0.1:7890'):
+ text = text+chunk
+ print(chunk, end="", flush=True)
+ print()
+ message.append({"role": "assistant", "content": text})
+``` \ No newline at end of file