MCPcopy Create free account
hub / github.com/Writesonic/GPTRouter / Model

Class Model

src/models/Model.ts:24–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22 */
23@Entity()
24export class Model extends BaseEntity {
25 /**
26 * Unique identifier for the model.
27 */
28
29 @PrimaryGeneratedColumn("uuid")
30 id: string;
31
32 @Column({ nullable: false })
33 name: string;
34
35 @ManyToOne(() => Provider, provider => provider.models)
36 @JoinColumn({ name: "providerId" })
37 provider: Provider;
38
39 @Column({ name: "providerId", nullable: false })
40 providerId: string;
41
42 @CreateDateColumn({ default: () => "NOW()" })
43 createdAt: Date;
44
45 @UpdateDateColumn({ default: () => "NOW()" })
46 updatedAt: Date;
47
48 @Column({ type: "enum", enum: ModelInputType })
49 inputType: ModelInputType;
50
51 @Column({ nullable: false })
52 order: number;
53
54 @OneToMany(() => ModelHealthCheck, healthCheck => healthCheck.model)
55 healthChecks: ModelHealthCheck[];
56
57 @OneToMany(() => ModelUsage, usage => usage.model)
58 usages: ModelUsage[];
59
60 @OneToOne(() => ModelCost, cost => cost.model)
61 cost: ModelCost;
62}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected