-
Notifications
You must be signed in to change notification settings - Fork 0
Jan can support Cloud provider #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove auth of /models and /completions now
@@ -1,19 +1,9 @@ | |||
package cache | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove all caches for clean PR, don't want to mix a lot of things now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Uh oh!
There was an error while loading. Please reload this page.