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, you need to initialize it with your API key. The API key can be found on the Trainkore platform. Here we are using a service class to manage the Trainkore instance.
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.