Skip to content

Commit 9d16e7c

Browse files
committed
group abstract methods
1 parent 67afa27 commit 9d16e7c

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

packages/inference/src/providers/providerHelper.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ export abstract class TaskProviderHelper {
2626
outputType?: "url" | "blob"
2727
): unknown;
2828

29+
/**
30+
* Prepare the route for the request
31+
* Needs to be implemented in the subclasses.
32+
*/
33+
abstract makeRoute(params: UrlParams): string;
34+
/**
35+
* Prepare the payload for the request
36+
* Needs to be implemented in the subclasses.
37+
*/
38+
abstract preparePayload(params: BodyParams): unknown;
39+
2940
/**
3041
* Prepare the base URL for the request
3142
*/
@@ -52,12 +63,6 @@ export abstract class TaskProviderHelper {
5263
return `${baseUrl}/${route}`;
5364
}
5465

55-
/**
56-
* Prepare the route for the request
57-
* Needs to be implemented in the subclasses.
58-
*/
59-
abstract makeRoute(params: UrlParams): string;
60-
6166
/**
6267
* Prepare the headers for the request
6368
*/
@@ -68,12 +73,6 @@ export abstract class TaskProviderHelper {
6873
}
6974
return headers;
7075
}
71-
72-
/**
73-
* Prepare the payload for the request
74-
* Needs to be implemented in the subclasses.
75-
*/
76-
abstract preparePayload(params: BodyParams): unknown;
7776
}
7877

7978
export class BaseConversationalTask extends TaskProviderHelper {

0 commit comments

Comments
 (0)