Skip to content

Commit 3d50d7f

Browse files
committed
Update Readme (sgl-project#11)
1 parent 38326f5 commit 3d50d7f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ pip install -e "python[all]"
3636
The example below shows how to use sglang to answer a mulit-turn question.
3737

3838
### Using OpenAI Models
39+
Set the OpenAI API Key
40+
```
41+
export OPENAI_API_KEY=sk-xxxxxx
42+
```
43+
44+
Then, answer a multi-turn question.
3945
```python
4046
from sglang import function, system, user, assistant, gen, set_default_backend, OpenAI
4147

@@ -99,7 +105,7 @@ To begin with, import sglang.
99105
import sglang as sgl
100106
```
101107

102-
`sglang` provides some simple primitives such as `gen`, `select`, `fork`.
108+
`sglang` provides some simple primitives such as `gen`, `select`, `fork`, `image`.
103109
You can implement your prompt flow in a function decorated by `sgl.function`.
104110
You can then invoke the function with `run` or `run_batch`.
105111
The system will manage the state, chat template, and parallelism for you.

0 commit comments

Comments
 (0)