-
Notifications
You must be signed in to change notification settings - Fork 0
Add conversation readme #136
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 GetSystemEnv(c *gin.Context) { | ||
if strings.HasPrefix(config.Version, "dev") { | ||
environment_variables.EnvironmentVariables.LoadFromEnv() | ||
c.JSON(http.StatusOK, environment_variables.EnvironmentVariables) | ||
} else { | ||
c.JSON(http.StatusOK, gin.H{}) | ||
} | ||
} |
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.
nonono
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.
=)) no ^ n
func (s *ConversationService) AddItemWithID(ctx context.Context, conversation *Conversation, userID uint, itemType ItemType, role *ItemRole, content []Content, customPublicID string) (*Item, *common.Error) { | ||
// Check access permissions |
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.
Consider refactoring this function next time. The arguments are growing, and we have to change the signature every time. Maybe just (ctx context.Context, item *conversation.Item). Items with a conversation ID can fulfill the task.
POST /v1/chat/completions | ||
{ | ||
"model": "jan-v1-4b", | ||
"messages": [ | ||
{"role": "user", "content": "What's the weather like?"} | ||
], | ||
"conversation": "conv_uzaxr1z1mq38k23r99kl1qq9eelobeam0gw21n8q9z", | ||
"stream": false | ||
} |
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.
Can you test it with the current version of Jan client to see if it is compatible?
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.
yes, I checked with current version of Jan web as well.
Close, I have another PR to replace this |
Fix the issue that item id have to generated
Add the conversation flows
// TODO
Discuss to handle dev tricks