Skip to content

Commit

Permalink
DeepSeek対応(仮)
Browse files Browse the repository at this point in the history
  • Loading branch information
soramimi committed Feb 6, 2025
1 parent 90f5029 commit e1c885d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/CommitMessageGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ GeneratedCommitMessage CommitMessageGenerator::parse_response(std::string const
char const *begin = in.c_str();
char const *end = begin + in.size();
jstream::Reader r(begin, end);
if (ai_type == GenerativeAI::GPT) {
if (ai_type == GenerativeAI::GPT || ai_type == GenerativeAI::DEEPSEEK) {
while (r.next()) {
if (r.match("{object")) {
if (r.string() == "chat.completion") {
Expand Down Expand Up @@ -325,7 +325,7 @@ std::string CommitMessageGenerator::generatePromptJSON(std::string const &prompt
{
auto type = model.type();

if (type == GenerativeAI::GPT) {
if (type == GenerativeAI::GPT || type == GenerativeAI::DEEPSEEK) {
std::string json = R"---({
"model": "%s",
"messages": [
Expand Down
2 changes: 1 addition & 1 deletion src/GenerativeAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ std::vector<GenerativeAI::Model> GenerativeAI::available_models()
models.emplace_back("gemini-1.0-pro");
models.emplace_back("gemini-1.0-flash");
models.emplace_back("gemini-1.0-nano");
// models.emplace_back("deepseek-chat");
models.emplace_back("deepseek-chat");
return models;
}

Expand Down

0 comments on commit e1c885d

Please sign in to comment.