Trainkore SDK allows you to interact with the Trainkore API to create chat completions, retrieve chat prompts, and access logs associated with a project. The SDK uses JWT-based authentication to secure API calls.
Features
Create chat prompts.
Retrieve chat prompts by ID.
Fetch logs by project ID.
Fetch logs by log ID.
Installation
You can install the Trainkore SDK via npm:
Usage
Initialize Trainkore SDK
To start using the SDK, initialize it with your API key. The API key can be found on the Trainkore platform.
Create a Chat Prompt
Once the SDK is initialized, you can create a chat prompt by calling the create method.
Retrieve a Chat Prompt by ID
You can retrieve a specific chat prompt by its ID using the getChatPromptById method.
Fetch Logs by Project ID
To fetch logs associated with a project by its projId, use the getLogsByProjectId method.
Fetch Log by Log ID
To retrieve a specific log by logId, use the getLogByLogId method.
Contributing
Contributions are welcome! Please submit a pull request or file an issue if you encounter any problems.