Closed vrushankportkey closed 9 months ago
🤖
Hey @vrushankportkey! Good to see you again. Let's dive into this bug you've encountered.
I'm sorry to hear that you're encountering issues with the Portkey Node SDK on Vercel. To better assist you, I need more specific details about the error you're experiencing. The error message you're receiving would be particularly helpful.
Based on the context provided, there are several common issues that can cause errors when deploying the Portkey Node SDK on Vercel:
Missing API Key: Ensure you have set the PORTKEY_API_KEY environment variable or passed the api_key in the initialization of Portkey. API keys can be found or created at the Portkey Dashboard.
Missing Base URL: You should provide a valid base URL, for example: https://api.portkey.ai
Missing Config Parameter: You should provide a valid Config object.
Missing Mode Parameter: You should provide a valid mode literal.
Invalid Portkey Mode: The "mode" parameter should be of type "ModesLiteral | Modes | None".
You can refer to the src/constants.ts file for more details.
As for your current configuration, it's stored in the config
property of the Portkey
class. The value of this property is set in the constructor of the class, and it can be either a record of string keys to unknown values, a string, null, or undefined. You can check this in the src/client.ts file.
Regarding the version you're using (0.1.xx), I couldn't find specific information about it in the repository. It would be helpful if you could provide the exact version number.
Please provide more details about the error message you're receiving and the exact version of the SDK you're using so I can assist you further.
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
Fixed with this PR: #20
Available from version 1.1.2 onwards.
Contact Details
No response
What happened?
A bug happened!
Version
0.1.xx (Default)
Relevant log output
No response
Code of Conduct