{"repo": "belingud/gptcomet", "files": {"internal/llm/deepseek.go": {"bb5578c824d024a736231e296410e104e54f7c58": {"t": 1785746056.7099354, "n": 1462, "h": "8ae5a6b8812241e5", "c": "package llm\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\n\t\"github.com/belingud/gptcomet/pkg/config\"\n\t\"github.com/belingud/gptcomet/pkg/types\"\n)\n\nconst (\n\tDefaultDeepSeekAPIBase = \"https://api.deepseek.com/v1\"\n\tDefaultDeepSeekModel = \"deepseek-v4-flash\"\n)\n\n// DeepSeekLLM implements the LLM interface for DeepSeek\ntype DeepSeekLLM struct {\n\t*BaseLLM\n}\n\n// NewDeepSeekLLM creates a new DeepSeekLLM\nfunc NewDeepSeekLLM(config *types.ClientConfig) *DeepSeekLLM {\n\tBuildStandardConfigSimple(config, DefaultDeepSeekAPIBase, DefaultDeepSeekModel)\n\treturn &DeepSeekLLM{\n\t\tBaseLLM: NewBaseLLM(config),\n\t}\n}\n\nfunc (d *DeepSeekLLM) Name() string {\n\treturn \"deepseek\"\n}\n\n// GetRequiredConfig returns provider-specific configuration requirements\nfunc (d *DeepSeekLLM) GetRequiredConfig() map[string]config.ConfigRequirement {\n\treturn map[string]config.ConfigRequirement{\n\t\t\"api_base\": {\n\t\t\tDefaultValue: DefaultDeepSeekAPIBase,\n\t\t\tPromptMessage: \"Enter DeepSeek API base\",\n\t\t},\n\t\t\"api_key\": {\n\t\t\tDefaultValue: \"\",\n\t\t\tPromptMessage: \"Enter API key\",\n\t\t},\n\t\t\"model\": {\n\t\t\tDefaultValue: DefaultDeepSeekModel,\n\t\t\tPromptMessage: \"Enter model name\",\n\t\t},\n\t\t\"max_tokens\": {\n\t\t\tDefaultValue: \"1024\",\n\t\t\tPromptMessage: \"Enter max tokens\",\n\t\t},\n\t}\n}\n\n// MakeRequest makes a request to the DeepSeek API\nfunc (d *DeepSeekLLM) MakeRequest(ctx context.Context, client *http.Client, message string, stream bool) (string, error) {\n\treturn d.BaseLLM.MakeRequest(ctx, client, d, message, stream)\n}\n"}, "54fe0b1cc834b585e1ed8b8d8ab6dde0e5832400": {"t": 1785759291.407747, "n": 1462, "h": "8ae5a6b8812241e5", "c": "package llm\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\n\t\"github.com/belingud/gptcomet/pkg/config\"\n\t\"github.com/belingud/gptcomet/pkg/types\"\n)\n\nconst (\n\tDefaultDeepSeekAPIBase = \"https://api.deepseek.com/v1\"\n\tDefaultDeepSeekModel = \"deepseek-v4-flash\"\n)\n\n// DeepSeekLLM implements the LLM interface for DeepSeek\ntype DeepSeekLLM struct {\n\t*BaseLLM\n}\n\n// NewDeepSeekLLM creates a new DeepSeekLLM\nfunc NewDeepSeekLLM(config *types.ClientConfig) *DeepSeekLLM {\n\tBuildStandardConfigSimple(config, DefaultDeepSeekAPIBase, DefaultDeepSeekModel)\n\treturn &DeepSeekLLM{\n\t\tBaseLLM: NewBaseLLM(config),\n\t}\n}\n\nfunc (d *DeepSeekLLM) Name() string {\n\treturn \"deepseek\"\n}\n\n// GetRequiredConfig returns provider-specific configuration requirements\nfunc (d *DeepSeekLLM) GetRequiredConfig() map[string]config.ConfigRequirement {\n\treturn map[string]config.ConfigRequirement{\n\t\t\"api_base\": {\n\t\t\tDefaultValue: DefaultDeepSeekAPIBase,\n\t\t\tPromptMessage: \"Enter DeepSeek API base\",\n\t\t},\n\t\t\"api_key\": {\n\t\t\tDefaultValue: \"\",\n\t\t\tPromptMessage: \"Enter API key\",\n\t\t},\n\t\t\"model\": {\n\t\t\tDefaultValue: DefaultDeepSeekModel,\n\t\t\tPromptMessage: \"Enter model name\",\n\t\t},\n\t\t\"max_tokens\": {\n\t\t\tDefaultValue: \"1024\",\n\t\t\tPromptMessage: \"Enter max tokens\",\n\t\t},\n\t}\n}\n\n// MakeRequest makes a request to the DeepSeek API\nfunc (d *DeepSeekLLM) MakeRequest(ctx context.Context, client *http.Client, message string, stream bool) (string, error) {\n\treturn d.BaseLLM.MakeRequest(ctx, client, d, message, stream)\n}\n"}, "9e9e61501b9b689b596df2800b1429313a179dbe": {"t": 1785759294.9440908, "n": 1458, "h": "75e45ffeb97cfb87", "c": "package llm\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\n\t\"github.com/belingud/gptcomet/pkg/config\"\n\t\"github.com/belingud/gptcomet/pkg/types\"\n)\n\nconst (\n\tDefaultDeepSeekAPIBase = \"https://api.deepseek.com/v1\"\n\tDefaultDeepSeekModel = \"deepseek-chat\"\n)\n\n// DeepSeekLLM implements the LLM interface for DeepSeek\ntype DeepSeekLLM struct {\n\t*BaseLLM\n}\n\n// NewDeepSeekLLM creates a new DeepSeekLLM\nfunc NewDeepSeekLLM(config *types.ClientConfig) *DeepSeekLLM {\n\tBuildStandardConfigSimple(config, DefaultDeepSeekAPIBase, DefaultDeepSeekModel)\n\treturn &DeepSeekLLM{\n\t\tBaseLLM: NewBaseLLM(config),\n\t}\n}\n\nfunc (d *DeepSeekLLM) Name() string {\n\treturn \"deepseek\"\n}\n\n// GetRequiredConfig returns provider-specific configuration requirements\nfunc (d *DeepSeekLLM) GetRequiredConfig() map[string]config.ConfigRequirement {\n\treturn map[string]config.ConfigRequirement{\n\t\t\"api_base\": {\n\t\t\tDefaultValue: DefaultDeepSeekAPIBase,\n\t\t\tPromptMessage: \"Enter DeepSeek API base\",\n\t\t},\n\t\t\"api_key\": {\n\t\t\tDefaultValue: \"\",\n\t\t\tPromptMessage: \"Enter API key\",\n\t\t},\n\t\t\"model\": {\n\t\t\tDefaultValue: DefaultDeepSeekModel,\n\t\t\tPromptMessage: \"Enter model name\",\n\t\t},\n\t\t\"max_tokens\": {\n\t\t\tDefaultValue: \"1024\",\n\t\t\tPromptMessage: \"Enter max tokens\",\n\t\t},\n\t}\n}\n\n// MakeRequest makes a request to the DeepSeek API\nfunc (d *DeepSeekLLM) MakeRequest(ctx context.Context, client *http.Client, message string, stream bool) (string, error) {\n\treturn d.BaseLLM.MakeRequest(ctx, client, d, message, stream)\n}\n"}, "b2eabb8a6e3b94557231661ee7b2e9744fa08575": {"t": 1785759296.135676, "n": 1608, "h": "a79595a8d61a016e", "c": "package llm\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\n\t\"github.com/belingud/gptcomet/pkg/config\"\n\t\"github.com/belingud/gptcomet/pkg/types\"\n)\n\n// DeepSeekLLM implements the LLM interface for DeepSeek\ntype DeepSeekLLM struct {\n\t*BaseLLM\n}\n\n// NewDeepSeekLLM creates a new DeepSeekLLM\nfunc NewDeepSeekLLM(config *types.ClientConfig) *DeepSeekLLM {\n\tif config.APIBase == \"\" {\n\t\tconfig.APIBase = \"https://api.deepseek.com/v1\"\n\t}\n\tif config.Model == \"\" {\n\t\tconfig.Model = \"deepseek-chat\"\n\t}\n\n\tif config.CompletionPath == nil {\n\t\tdefaultPath := \"chat/completions\"\n\t\tconfig.CompletionPath = &defaultPath\n\t}\n\tif config.AnswerPath == \"\" {\n\t\tconfig.AnswerPath = \"choices.0.message.content\"\n\t}\n\n\treturn &DeepSeekLLM{\n\t\tBaseLLM: NewBaseLLM(config),\n\t}\n}\n\nfunc (d *DeepSeekLLM) Name() string {\n\treturn \"deepseek\"\n}\n\n// GetRequiredConfig returns provider-specific configuration requirements\nfunc (d *DeepSeekLLM) GetRequiredConfig() map[string]config.ConfigRequirement {\n\treturn map[string]config.ConfigRequirement{\n\t\t\"api_base\": {\n\t\t\tDefaultValue: \"https://api.deepseek.com/v1\",\n\t\t\tPromptMessage: \"Enter DeepSeek API base\",\n\t\t},\n\t\t\"api_key\": {\n\t\t\tDefaultValue: \"\",\n\t\t\tPromptMessage: \"Enter API key\",\n\t\t},\n\t\t\"model\": {\n\t\t\tDefaultValue: \"deepseek-chat\",\n\t\t\tPromptMessage: \"Enter model name\",\n\t\t},\n\t\t\"max_tokens\": {\n\t\t\tDefaultValue: \"1024\",\n\t\t\tPromptMessage: \"Enter max tokens\",\n\t\t},\n\t}\n}\n\n// MakeRequest makes a request to the DeepSeek API\nfunc (d *DeepSeekLLM) MakeRequest(ctx context.Context, client *http.Client, message string, stream bool) (string, error) {\n\treturn d.BaseLLM.MakeRequest(ctx, client, d, message, stream)\n}\n"}, "bf2cdbcd2d7fec9b512c958f1e95bbc0e92cfaf6": {"t": 1785759298.6877468, "n": 1153, "h": "1f46c3de5458f0f2", "c": "package llm\n\nimport (\n\t\"github.com/belingud/gptcomet/pkg/config\"\n\t\"github.com/belingud/gptcomet/pkg/types\"\n)\n\n// DeepSeekLLM implements the LLM interface for DeepSeek\ntype DeepSeekLLM struct {\n\t*OpenAILLM\n}\n\n// NewDeepSeekLLM creates a new DeepSeekLLM\nfunc NewDeepSeekLLM(config *types.ClientConfig) *DeepSeekLLM {\n\tif config.APIBase == \"\" {\n\t\tconfig.APIBase = \"https://api.deepseek.com/v1\"\n\t}\n\tif config.Model == \"\" {\n\t\tconfig.Model = \"deepseek-chat\"\n\t}\n\n\treturn &DeepSeekLLM{\n\t\tOpenAILLM: NewOpenAILLM(config),\n\t}\n}\n\nfunc (d *DeepSeekLLM) Name() string {\n\treturn \"deepseek\"\n}\n\n// GetRequiredConfig returns provider-specific configuration requirements\nfunc (d *DeepSeekLLM) GetRequiredConfig() map[string]config.ConfigRequirement {\n\treturn map[string]config.ConfigRequirement{\n\t\t\"api_base\": {\n\t\t\tDefaultValue: \"https://api.deepseek.com/v1\",\n\t\t\tPromptMessage: \"Enter DeepSeek API base\",\n\t\t},\n\t\t\"api_key\": {\n\t\t\tDefaultValue: \"\",\n\t\t\tPromptMessage: \"Enter API key\",\n\t\t},\n\t\t\"model\": {\n\t\t\tDefaultValue: \"deepseek-chat\",\n\t\t\tPromptMessage: \"Enter model name\",\n\t\t},\n\t\t\"max_tokens\": {\n\t\t\tDefaultValue: \"1024\",\n\t\t\tPromptMessage: \"Enter max tokens\",\n\t\t},\n\t}\n}\n"}, "b4e7d2dcf62717817a996b66c4c32e5d428f4911": {"t": 1785759300.2525332, "n": 1159, "h": "38fdc6b3e86087f7", "c": "package llm\n\nimport (\n\t\"github.com/belingud/go-gptcomet/pkg/config\"\n\t\"github.com/belingud/go-gptcomet/pkg/types\"\n)\n\n// DeepSeekLLM implements the LLM interface for DeepSeek\ntype DeepSeekLLM struct {\n\t*OpenAILLM\n}\n\n// NewDeepSeekLLM creates a new DeepSeekLLM\nfunc NewDeepSeekLLM(config *types.ClientConfig) *DeepSeekLLM {\n\tif config.APIBase == \"\" {\n\t\tconfig.APIBase = \"https://api.deepseek.com/v1\"\n\t}\n\tif config.Model == \"\" {\n\t\tconfig.Model = \"deepseek-chat\"\n\t}\n\n\treturn &DeepSeekLLM{\n\t\tOpenAILLM: NewOpenAILLM(config),\n\t}\n}\n\nfunc (d *DeepSeekLLM) Name() string {\n\treturn \"deepseek\"\n}\n\n// GetRequiredConfig returns provider-specific configuration requirements\nfunc (d *DeepSeekLLM) GetRequiredConfig() map[string]config.ConfigRequirement {\n\treturn map[string]config.ConfigRequirement{\n\t\t\"api_base\": {\n\t\t\tDefaultValue: \"https://api.deepseek.com/v1\",\n\t\t\tPromptMessage: \"Enter DeepSeek API base\",\n\t\t},\n\t\t\"api_key\": {\n\t\t\tDefaultValue: \"\",\n\t\t\tPromptMessage: \"Enter API key\",\n\t\t},\n\t\t\"model\": {\n\t\t\tDefaultValue: \"deepseek-chat\",\n\t\t\tPromptMessage: \"Enter model name\",\n\t\t},\n\t\t\"max_tokens\": {\n\t\t\tDefaultValue: \"1024\",\n\t\t\tPromptMessage: \"Enter max tokens\",\n\t\t},\n\t}\n}\n"}}, "internal/llm/hunyuan.go": {"bb5578c824d024a736231e296410e104e54f7c58": {"t": 1785809867.4466558, "n": 1491, "h": "55f5d9b56da56c33", "c": "package llm\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\n\t\"github.com/belingud/gptcomet/pkg/config\"\n\t\"github.com/belingud/gptcomet/pkg/types\"\n)\n\nconst (\n\tDefaultHunyuanAPIBase = \"https://api.hunyuan.cloud.tencent.com/v1\"\n\tDefaultHunyuanModel = \"hunyuan-lite\"\n)\n\n// HunyuanLLM implements the LLM interface for Tencent Hunyuan\n// It extends OpenAILLM since Hunyuan API is compatible with OpenAI\ntype HunyuanLLM struct {\n\t*OpenAILLM\n}\n\n// NewHunyuanLLM creates a new HunyuanLLM\nfunc NewHunyuanLLM(config *types.ClientConfig) *HunyuanLLM {\n\tBuildStandardConfigSimple(config, DefaultHunyuanAPIBase, DefaultHunyuanModel)\n\n\treturn &HunyuanLLM{\n\t\tOpenAILLM: NewOpenAILLM(config),\n\t}\n}\n\nfunc (h *HunyuanLLM) Name() string {\n\treturn \"hunyuan\"\n}\n\n// GetRequiredConfig returns provider-specific configuration requirements\nfunc (h *HunyuanLLM) GetRequiredConfig() map[string]config.ConfigRequirement {\n\trequirements := h.OpenAILLM.GetRequiredConfig()\n\t// update API base\n\trequirements[\"api_base\"] = config.ConfigRequirement{\n\t\tDefaultValue: DefaultHunyuanAPIBase,\n\t\tPromptMessage: \"Enter Hunyuan API base URL\",\n\t}\n\t// update model\n\trequirements[\"model\"] = config.ConfigRequirement{\n\t\tDefaultValue: DefaultHunyuanModel,\n\t\tPromptMessage: \"Enter model name\",\n\t}\n\treturn requirements\n}\n\n// MakeRequest makes a request to the API\nfunc (h *HunyuanLLM) MakeRequest(ctx context.Context, client *http.Client, message string, stream bool) (string, error) {\n\treturn h.OpenAILLM.MakeRequest(ctx, client, message, stream)\n}\n"}}}}