Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ChatCmd = &cobra.Command{ Use: "chat", Short: "Chat with Ava", Long: `Chat with Ava.`, Run: func(cmd *cobra.Command, args []string) { logger := viper.Get("logger").(logger.ILogger) configuration := configuration.LoadConfiguration(logger) logger.Info("Chatting with Ava") chat, err := chat.NewChat( backend, configuration.AI.OpenAI.APIKey, logger, chat.WithLanguage(language), chat.WithConfigureAssistant(logger, configuration.Executors.Enabled), ) if err != nil { logger.Fatal(err.Error()) } if thread == "" { thread, err = chat.InitChat() if err != nil { logger.Fatal(err.Error()) } } response, err := chat.Chat(message, thread) if err != nil { logger.Fatal(err.Error()) } logger.Info(response) logger.Info(fmt.Sprintf("If you want to continue the conversation, use the --thread flag with the following value: %s", thread)) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.