mirror of
https://github.com/karpathy/nanochat.git
synced 2026-05-07 08:19:52 +00:00
Merge pull request #35 from manmohan659/fix/stream-body-format
fix(frontend): type fix for proxyUpstream
This commit is contained in:
commit
2dd914a69d
|
|
@ -18,7 +18,8 @@ function sseEvent(data: Record<string, unknown>) {
|
|||
return encoder.encode(`data: ${JSON.stringify(data)}\n\n`);
|
||||
}
|
||||
|
||||
async function proxyUpstream(body: Record<string, unknown>, upstreamUrl: string, authHeader: string | null) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
async function proxyUpstream(body: any, upstreamUrl: string, authHeader: string | null) {
|
||||
const headers: Record<string, string> = { 'Content-Type': 'application/json' };
|
||||
if (authHeader) headers['Authorization'] = authHeader;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user