Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
coderai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
coderai
Commits
1b47f3ff
Commit
1b47f3ff
authored
Feb 28, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more debugging to track llama.cpp streaming response
parent
b341f96a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
coderai
coderai
+6
-0
No files found.
coderai
View file @
1b47f3ff
...
@@ -1048,6 +1048,7 @@ class VulkanBackend(ModelBackend):
...
@@ -1048,6 +1048,7 @@ class VulkanBackend(ModelBackend):
total_content
=
""
total_content
=
""
chunk_count
=
0
chunk_count
=
0
try
:
try
:
print
(
f
"DEBUG: generate_chat_stream: Calling create_chat_completion with tools={tools}"
)
stream
=
self
.
model
.
create_chat_completion
(
stream
=
self
.
model
.
create_chat_completion
(
messages
=
messages
,
messages
=
messages
,
max_tokens
=
max_tokens
,
max_tokens
=
max_tokens
,
...
@@ -1057,8 +1058,10 @@ class VulkanBackend(ModelBackend):
...
@@ -1057,8 +1058,10 @@ class VulkanBackend(ModelBackend):
tools
=
tools
,
tools
=
tools
,
stream
=
True
,
stream
=
True
,
)
)
print
(
f
"DEBUG: generate_chat_stream: Got stream object: {type(stream)}"
)
for
chunk
in
stream
:
for
chunk
in
stream
:
chunk_count
+=
1
chunk_count
+=
1
print
(
f
"DEBUG: generate_chat_stream: Raw chunk {chunk_count}: {repr(chunk)}"
)
delta
=
chunk
[
"choices"
][
0
]
.
get
(
"delta"
,
{})
delta
=
chunk
[
"choices"
][
0
]
.
get
(
"delta"
,
{})
content
=
delta
.
get
(
"content"
,
""
)
content
=
delta
.
get
(
"content"
,
""
)
if
content
:
if
content
:
...
@@ -1069,6 +1072,9 @@ class VulkanBackend(ModelBackend):
...
@@ -1069,6 +1072,9 @@ class VulkanBackend(ModelBackend):
print
(
f
"DEBUG: Empty stream from create_chat_completion, using fallback"
)
print
(
f
"DEBUG: Empty stream from create_chat_completion, using fallback"
)
raise
Exception
(
"Empty stream response"
)
raise
Exception
(
"Empty stream response"
)
except
Exception
as
e
:
except
Exception
as
e
:
print
(
f
"DEBUG: generate_chat_stream exception: {type(e).__name__}: {e}"
)
import
traceback
traceback
.
print_exc
()
if
chunk_count
==
0
:
if
chunk_count
==
0
:
print
(
f
"Warning: create_chat_completion stream failed ({e}), falling back to text generation"
)
print
(
f
"Warning: create_chat_completion stream failed ({e}), falling back to text generation"
)
# Fallback: format messages manually and use text generation
# Fallback: format messages manually and use text generation
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment