Skip to content

Commit 0a5ad3e

Browse files
authored
Bump version to v0.2.33 (#2717)
1 parent 0bbeddc commit 0a5ad3e

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

fastchat/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.32"
1+
__version__ = "0.2.33"

fastchat/serve/gradio_web_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ def build_single_model_ui(models, add_promotion_links=False):
610610
# 🏔️ Chat with Open Large Language Models
611611
{promotion}
612612
613-
## 👉 Choose any model to chat
613+
## Choose any model to chat
614614
"""
615615

616616
state = gr.State()
@@ -635,7 +635,7 @@ def build_single_model_ui(models, add_promotion_links=False):
635635
with gr.Column(scale=20):
636636
textbox = gr.Textbox(
637637
show_label=False,
638-
placeholder="Enter your prompt here and press ENTER",
638+
placeholder="👉 Enter your prompt and press ENTER",
639639
container=False,
640640
elem_id="input_box",
641641
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "fschat"
7-
version = "0.2.32"
7+
version = "0.2.33"
88
description = "An open platform for training, serving, and evaluating large language model based chatbots."
99
readme = "README.md"
1010
requires-python = ">=3.8"

tests/test_openai_api.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,28 @@ def test_list_models():
2222
def test_completion(model, logprob):
2323
prompt = "Once upon a time"
2424
completion = openai.Completion.create(
25-
model=model, prompt=prompt, logprobs=logprob, max_tokens=64
25+
model=model,
26+
prompt=prompt,
27+
logprobs=logprob,
28+
max_tokens=64,
29+
temperature=0,
2630
)
2731
print(f"full text: {prompt + completion.choices[0].text}", flush=True)
2832
if completion.choices[0].logprobs is not None:
29-
print(f"logprobs: {completion.choices[0].logprobs.token_logprobs}", flush=True)
33+
print(
34+
f"logprobs: {completion.choices[0].logprobs.token_logprobs[:10]}",
35+
flush=True,
36+
)
3037

3138

3239
def test_completion_stream(model):
3340
prompt = "Once upon a time"
3441
res = openai.Completion.create(
35-
model=model, prompt=prompt, max_tokens=64, stream=True
42+
model=model,
43+
prompt=prompt,
44+
max_tokens=64,
45+
stream=True,
46+
temperature=0,
3647
)
3748
print(prompt, end="")
3849
for chunk in res:
@@ -49,14 +60,18 @@ def test_embedding(model):
4960

5061
def test_chat_completion(model):
5162
completion = openai.ChatCompletion.create(
52-
model=model, messages=[{"role": "user", "content": "Hello! What is your name?"}]
63+
model=model,
64+
messages=[{"role": "user", "content": "Hello! What is your name?"}],
65+
temperature=0,
5366
)
5467
print(completion.choices[0].message.content)
5568

5669

5770
def test_chat_completion_stream(model):
5871
messages = [{"role": "user", "content": "Hello! What is your name?"}]
59-
res = openai.ChatCompletion.create(model=model, messages=messages, stream=True)
72+
res = openai.ChatCompletion.create(
73+
model=model, messages=messages, stream=True, temperature=0
74+
)
6075
for chunk in res:
6176
content = chunk["choices"][0]["delta"].get("content", "")
6277
print(content, end="", flush=True)

0 commit comments

Comments
 (0)