feat: update models and prompts
This commit is contained in:
		
							parent
							
								
									265392e34f
								
							
						
					
					
						commit
						1d768799df
					
				| 
						 | 
				
			
			@ -234,7 +234,7 @@ func handleAssistantConversation(c tele.Context, thread []*tele.Message) error {
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	req := openai.ChatRequest{
 | 
			
		||||
		Model:       openai.ModelGpt04Turbo,
 | 
			
		||||
		Model:       openai.ModelGpt4O,
 | 
			
		||||
		Messages:    chatReqMsgs,
 | 
			
		||||
		Temperature: lo.ToPtr(0.42),
 | 
			
		||||
		MaxTokens:   2048,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,7 +28,7 @@ func handleKanjiCmd(c tele.Context) error {
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	req := openai.ChatRequest{
 | 
			
		||||
		Model: openai.ModelGpt0305Turbo,
 | 
			
		||||
		Model: openai.ModelGpt4O,
 | 
			
		||||
		Messages: []openai.ChatMessage{
 | 
			
		||||
			{
 | 
			
		||||
				Role:    openai.ChatRoleSystem,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -72,7 +72,7 @@ func handleTranslateBtn(c tele.Context) error {
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	req := openai.ChatRequest{
 | 
			
		||||
		Model: openai.ModelGpt0305Turbo,
 | 
			
		||||
		Model: openai.ModelGpt4O,
 | 
			
		||||
		Messages: []openai.ChatMessage{
 | 
			
		||||
			{
 | 
			
		||||
				Role:    openai.ChatRoleSystem,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,11 +1,7 @@
 | 
			
		|||
package openai
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
	ModelTextDavinciEdit001 = "text-davinci-edit-001" // legacy model
 | 
			
		||||
	ModelGpt0305Turbo       = "gpt-3.5-turbo"         // legacy model
 | 
			
		||||
	ModelGpt0305Turbo_0125  = "gpt-3.5-turbo-0125"    // legacy model
 | 
			
		||||
	ModelGpt04              = "gpt-4"                 // legacy model
 | 
			
		||||
	ModelGpt04_0613         = "gpt-4-0613"            // legacy model
 | 
			
		||||
	ModelGpt04Turbo         = "gpt-4-turbo"
 | 
			
		||||
	ModelGpt04Turbo_240409  = "gpt-4-turbo-2024-04-09"
 | 
			
		||||
	ModelGpt4O     = "gpt-4o"     // Safe default
 | 
			
		||||
	ModelO1Preview = "o1-preview" // Expensive
 | 
			
		||||
	ModelO1Mini    = "o1-mini"
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,7 +13,7 @@ func Assistant() string {
 | 
			
		|||
		"",
 | 
			
		||||
		"Due to technical limitations, older messages may not be available to Misaka.",
 | 
			
		||||
		"",
 | 
			
		||||
		"We are currently in the year 2024.",
 | 
			
		||||
		"We are currently in the year 2025.",
 | 
			
		||||
	}, "\n")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue