XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Remove reasoning ticker

41abdf71
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

4 个文件 +2 -13
Modified g4f/Provider/ARTA.py +2 -2
@@ -193,9 +193,9 @@ class ARTA(AsyncGeneratorProvider, ProviderModelMixin):
193 193 if last_status != status:
194 194 last_status = status
195 195 if status == "IN_QUEUE":
196 yield Reasoning(label="Waiting", ticker="⌛" * counter)
196 yield Reasoning(label="Waiting")
197 197 else:
198 yield Reasoning(label="Generating", ticker="⚽" * counter)
198 yield Reasoning(label="Generating")
199 199 await asyncio.sleep(2) # Poll every 2 seconds
200 200 else:
201 201 raise ResponseError(f"Image generation failed with status: {status}")
Modified g4f/gui/client/static/css/style.css +0 -6
@@ -354,12 +354,6 @@ body:not(.white) a:visited{
354 354
355 355 .message .reasoning_title {
356 356 cursor: pointer;
357 height: 22px;
358 overflow: hidden;
359 }
360
361 .message .reasoning_title strong {
362 float: left;
363 357 }
364 358
365 359 .message .user i {
Modified g4f/gui/client/static/js/chat.v1.js +0 -1
@@ -912,7 +912,6 @@ async function add_message_chunk(message, message_id, provider, scroll, finish_m
912 912 } if (message.token) {
913 913 reasoning_storage[message_id].text += message.token;
914 914 }
915 reasoning_storage[message_id].ticker = message.ticker;
916 915 update_message(content_map, message_id, render_reasoning(reasoning_storage[message_id]), scroll);
917 916 } else if (message.type == "parameters") {
918 917 if (!parameters_storage[provider]) {
Modified g4f/providers/response.py +0 -4
@@ -180,14 +180,12 @@ class Reasoning(ResponseType):
180 180 token: Optional[str] = None,
181 181 label: Optional[str] = None,
182 182 status: Optional[str] = None,
183 ticker: Optional[str] = None,
184 183 is_thinking: Optional[str] = None
185 184 ) -> None:
186 185 """Initialize with token, status, and thinking state."""
187 186 self.token = token
188 187 self.label = label
189 188 self.status = status
190 self.ticker = ticker
191 189 self.is_thinking = is_thinking
192 190
193 191 def __str__(self) -> str:
@@ -210,8 +208,6 @@ class Reasoning(ResponseType):
210 208 def get_dict(self) -> Dict:
211 209 """Return a dictionary representation of the reasoning."""
212 210 if self.label is not None:
213 if self.ticker is not None:
214 return {"label": self.label, "status": self.status, "ticker": self.ticker}
215 211 return {"label": self.label, "status": self.status}
216 212 if self.is_thinking is None:
217 213 if self.status is None: