Skip to content

Conversation

locnguyen1986
Copy link
Contributor

@locnguyen1986 locnguyen1986 commented Sep 17, 2025

Fix the issue that item id have to generated
Add the conversation flows
// TODO
Discuss to handle dev tricks

Comment on lines +82 to +89
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{})
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nonono

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

=)) no ^ n

Comment on lines +182 to +183
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
Copy link
Collaborator

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.

Comment on lines +108 to +116
POST /v1/chat/completions
{
"model": "jan-v1-4b",
"messages": [
{"role": "user", "content": "What's the weather like?"}
],
"conversation": "conv_uzaxr1z1mq38k23r99kl1qq9eelobeam0gw21n8q9z",
"stream": false
}
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@locnguyen1986
Copy link
Contributor Author

Close, I have another PR to replace this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants