Skip to content

Fix/chat completion error#31

Open
janb-random wants to merge 2 commits intoRossAscends:mainfrom
janb-random:fix/Chat-Completion-Error
Open

Fix/chat completion error#31
janb-random wants to merge 2 commits intoRossAscends:mainfrom
janb-random:fix/Chat-Completion-Error

Conversation

@janb-random
Copy link
Copy Markdown

Fixes #30

Also the change in "function replaceMacros" fixes a then following Error:

[ERROR] api - [anonymous] Error reading file: TypeError: Cannot read properties of undefined (reading 'replace')
at replaceMacros (file:///.../STMP/src/api-calls.js:385:41)
at file:///.../STMP/src/api-calls.js:610:49
[2026-04-02T12:44:32.783] [ERROR] api - [Object.getAIResponse] Error while requesting AI response: TypeError: Cannot read properties of undefined (reading 'replace')
at replaceMacros (file:///.../STMP/src/api-calls.js:385:41)
at file:///.../STMP/src/api-calls.js:610:49
file:///.../STMP/src/stream.js:266
const [AIResponse] = await api.getAIResponse(
^

TypeError: (intermediate value) is not iterable
at Object.handleResponse (file:///.../STMP/src/stream.js:266:30)
at async processNextInQueue (file:///.../STMP/server.js:241:5)

Node.js v22.18.0
Drücken Sie eine beliebige Taste . . .

janb-random and others added 2 commits April 2, 2026 20:46
- Ensure `getAPIDefaults` is awaited before API calls in `getAIResponse`
- Add error handling for missing default parameters in `getAIResponse`
- Add input guard in `replaceMacros` for non-string values

fixes RossAscends#30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chat Completion Error

1 participant