Conversation
|
|
||
| func (cs *CronService) Start(ctx context.Context, ctab *crontab.Crontab) { | ||
| // Run initial check | ||
| cs.InferenceModelRegistry.CheckInferenceModels(ctx) |
There was a problem hiding this comment.
I remove cache support in this version for clean PR.
So no need to reload models frequently, let call it directly.
| @@ -0,0 +1,77 @@ | |||
| package model | |||
|
|
|||
| import ( | |||
There was a problem hiding this comment.
all fields are sync from OpenRouter.
We may follow them first and build own variables later.
|
|
||
| type ProviderKind string | ||
|
|
||
| const ( |
There was a problem hiding this comment.
have to list them all, different provider may require different header or login.
| @@ -0,0 +1,89 @@ | |||
| package model | |||
There was a problem hiding this comment.
each provider should handle their pricing, not base on the model, base on provider-model relationship
| @@ -0,0 +1,137 @@ | |||
| package model | |||
There was a problem hiding this comment.
lets keep this utils in model, those helpers only serve code inside, we may wrapper to utils folder if other domains or services call that
| projectID = ptr.ToUint(input.ProjectID) | ||
| } | ||
|
|
||
| if kind != ProviderCustom { |
There was a problem hiding this comment.
we only allow one provider kind in system if it's not custom
| chatRoute.authService.AppUserAuthMiddleware(), | ||
| chatRoute.authService.RegisteredUserMiddleware(), | ||
| ) | ||
| chatRouter := router.Group("/chat") |
There was a problem hiding this comment.
remove auth of /models and /completions now
| @@ -1,19 +1,9 @@ | |||
| package cache | |||
|
|
|||
There was a problem hiding this comment.
remove all caches for clean PR, don't want to mix a lot of things now
Uh oh!
There was an error while loading. Please reload this page.