Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

utils.ts 382 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  1. import type { ApiProvider, ProviderResponse } from '../src/types';
  2. export class TestGrader implements ApiProvider {
  3. async callApi(): Promise<ProviderResponse> {
  4. return {
  5. output: JSON.stringify({ pass: true, reason: 'Test grading output' }),
  6. tokenUsage: { total: 10, prompt: 5, completion: 5 },
  7. };
  8. }
  9. id(): string {
  10. return 'TestGradingProvider';
  11. }
  12. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...