appleboy / CodeGPT

A CLI written in Go language that writes git commit messages or do a code review brief for you using ChatGPT AI (gpt-4o, gpt-4-turbo, gpt-3.5-turbo model) and automatically installs a git prepare-commit-msg hook.
MIT License
1.16k stars 100 forks source link

essage: invalid character '<' looking for beginning of value #132

Closed liangsj closed 7 months ago

liangsj commented 8 months ago

Summarize the commit message use gpt-3.5-turbo model We are trying to summarize a git diff Error: error, status code: 403, message: invalid character '<' looking for beginning of value

lqshow commented 7 months ago
image

类似的错误

appleboy commented 7 months ago

@liangsj, @lqshow openAI Model?

lqshow commented 7 months ago

@liangsj, @lqshow openAI Model?

gpt-4

appleboy commented 7 months ago

@lqshow Show your config by codegpt conflig list

lqshow commented 7 months ago

@lqshow Show your config by codegpt conflig list

image
lqshow commented 7 months ago

@appleboy 有没什么我可以在本地尝试做的方向吗?

appleboy commented 7 months ago

I tried the gpt-4, gpt-4-1106-preview and gpt-3.5-turbo versions and all worked.

image image

I can't reproduce the problem. Please update the codegpt version to v0.7.0

fjchen7 commented 7 months ago

I have the same issue. The problem may due to the custom openai.base_url.

@appleboy can you help with it?

appleboy commented 7 months ago

Show your config

fjchen7 commented 7 months ago

@appleboy

Key                       Value                  
git.diff_unified          5                      
git.exclude_list                                 
git.template_file                                
git.template_string                              
openai.api_key            ****************       
openai.api_version                               
openai.base_url           https://api.gptapi.us  
openai.frequency_penalty  <nil>                  
openai.headers                                   
openai.max_tokens         1000                   
openai.model              gpt-4                  
openai.model_name         gpt-3.5-turbo          
openai.org_id                                    
openai.presence_penalty   <nil>                  
openai.provider           openai                 
openai.proxy                                     
openai.skip_verify        false                  
openai.socks                                     
openai.temperature        1                      
openai.timeout            30s                    
openai.top_p              <nil>                  
output.lang               zh-cn 

My custom openai.base_url can work well in other GPT tools.

TankNee commented 4 months ago

add v1 for your custom openai base_url