misc: add pre-commit config (#637)
This commit is contained in:
@@ -3,6 +3,7 @@ Usage:
|
||||
export GCP_PROJECT_ID=******
|
||||
python3 gemini_example_chat.py
|
||||
"""
|
||||
|
||||
import sglang as sgl
|
||||
|
||||
|
||||
@@ -30,7 +31,7 @@ def stream():
|
||||
state = multi_turn_question.run(
|
||||
question_1="What is the capital of the United States?",
|
||||
question_2="List two local attractions.",
|
||||
stream=True
|
||||
stream=True,
|
||||
)
|
||||
|
||||
for out in state.text_iter():
|
||||
@@ -39,13 +40,18 @@ def stream():
|
||||
|
||||
|
||||
def batch():
|
||||
states = multi_turn_question.run_batch([
|
||||
{"question_1": "What is the capital of the United States?",
|
||||
"question_2": "List two local attractions."},
|
||||
|
||||
{"question_1": "What is the capital of France?",
|
||||
"question_2": "What is the population of this city?"},
|
||||
])
|
||||
states = multi_turn_question.run_batch(
|
||||
[
|
||||
{
|
||||
"question_1": "What is the capital of the United States?",
|
||||
"question_2": "List two local attractions.",
|
||||
},
|
||||
{
|
||||
"question_1": "What is the capital of France?",
|
||||
"question_2": "What is the population of this city?",
|
||||
},
|
||||
]
|
||||
)
|
||||
|
||||
for s in states:
|
||||
print(s.messages())
|
||||
|
||||
Reference in New Issue
Block a user