Add validator to chat completion with json response #25
Annotations
4 errors
src/chains/prompt-with-retry.spec.ts > Prompt with Retry > should retry prompt:
src/chains/prompt-with-retry.ts#L38
Error: Max retries reached. Last error: [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"color"
],
"message": "Required"
}
], thread id: thread_4kJF12o2cW55Ohhg7eS0jGkO
❯ promptWithRetry src/chains/prompt-with-retry.ts:38:10
❯ src/chains/prompt-with-retry.spec.ts:10:18
|
src/completions/completion-with-functions.spec.ts > Completion with Functions > should run completion with functions:
src/completions/completion-with-functions.ts#L67
Error: 400 you must provide a model parameter
❯ Function.generate node_modules/openai/src/error.ts:70:14
❯ OpenAI.makeStatusError node_modules/openai/src/core.ts:397:21
❯ OpenAI.makeRequest node_modules/openai/src/core.ts:460:24
❯ Module.completionWithFunctions src/completions/completion-with-functions.ts:67:19
❯ src/completions/completion-with-functions.spec.ts:13:16
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 400, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '8ac557cfcd481682-SJC', connection: 'keep-alive', 'content-length': '167', 'content-type': 'application/json; charset=utf-8', date: 'Thu, 01 Aug 2024 11:03:40 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=WlqiyQGx31KXTx5z3QNpEJi3c_urtYU4qS0WNH2C2hc-1722510220-1.0.1.1-aU331GFOsw.espr5s807M7GhTYsdAd5er1yyd2OZw3tNcwoF.cOlwTim9yCLsrvMAi6t6OrzkiFW5K2BcPb.8g; path=/; expires=Thu, 01-Aug-24 11:33:40 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=qo33FN6NK_4OUdhJXb7CEU2ZpQsdZvkWlFRZgBpu020-1722510220819-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=15552000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_9c25254d23fb2b107fbc8a06dca4c702' }, request_id: 'req_9c25254d23fb2b107fbc8a06dca4c702', error: { message: 'you must provide a model parameter', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
src/completions/completion-with-json.spec.ts > Completion with JSON response > should run completion with JSON response:
src/completions/completion-with-functions.ts#L67
Error: 400 you must provide a model parameter
❯ Function.generate node_modules/openai/src/error.ts:70:14
❯ OpenAI.makeStatusError node_modules/openai/src/core.ts:397:21
❯ OpenAI.makeRequest node_modules/openai/src/core.ts:460:24
❯ Module.completionWithFunctions src/completions/completion-with-functions.ts:67:19
❯ Module.completionWithJsonResponse src/completions/completion-with-json.ts:43:14
❯ src/completions/completion-with-json.spec.ts:13:16
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { status: 400, headers: { 'alt-svc': 'h3=":443"; ma=86400', 'cf-cache-status': 'DYNAMIC', 'cf-ray': '8ac557ccd84f642e-SJC', connection: 'keep-alive', 'content-length': '167', 'content-type': 'application/json; charset=utf-8', date: 'Thu, 01 Aug 2024 11:03:40 GMT', server: 'cloudflare', 'set-cookie': '__cf_bm=_70OHKBiDQTjlzQ8Zd.j.Nxz57Mr6nGjVW2jIVAAoSw-1722510220-1.0.1.1-dWI7XlU36W7dTW6fZ7Z_ozAgyi_tvTY5YKwbc2a8H3gJnw0mfPCbkacFz8Avt.sJ6S3uB7f_nQosRJM6wBBMWg; path=/; expires=Thu, 01-Aug-24 11:33:40 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=7M3DKEK4Sg31LKG0vTJP8mJV34nKaOOYIWjtQPKLeSc-1722510220470-0.0.1.1-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None', 'strict-transport-security': 'max-age=15552000; includeSubDomains; preload', vary: 'Origin', 'x-content-type-options': 'nosniff', 'x-request-id': 'req_fda6eda74fd5c8826dd55dd0937920c6' }, request_id: 'req_fda6eda74fd5c8826dd55dd0937920c6', error: { message: 'you must provide a model parameter', type: 'invalid_request_error', param: null, code: null }, code: null, param: null }
|
build (20.x)
Process completed with exit code 1.
|