Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ models:
endpoint: https://api.openai.com/v1/chat/completions
auth_env_var: OPENAI_API_KEY
org_env_var: OPENAI_ORG_ID
project_env_var: OPENAI_PROJECT_ID
prompt:
[
{
Expand All @@ -20,6 +21,7 @@ models:
endpoint: https://api.openai.com/v1/chat/completions
auth_env_var: OPENAI_API_KEY
org_env_var: OPENAI_ORG_ID
project_env_var: OPENAI_PROJECT_ID
prompt:
[
{
Expand All @@ -34,6 +36,7 @@ models:
endpoint: https://api.openai.com/v1/chat/completions
auth_env_var: OPENAI_API_KEY
org_env_var: OPENAI_ORG_ID
project_env_var: OPENAI_PROJECT_ID
prompt:
[
{
Expand Down
3 changes: 3 additions & 0 deletions llm/llm.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func (c *LLMClient) createRequest(payload Payload) (*http.Request, error) {
if c.config.OrgID != "" {
req.Header.Set("OpenAI-Organization", c.config.OrgID)
}
if c.config.ProjectID != "" {
req.Header.Set("OpenAI-Project", c.config.ProjectID)
}
req.Header.Set("Content-Type", "application/json")
return req, nil
}
Expand Down
1 change: 1 addition & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ type ModelConfig struct {
Endpoint string `yaml:"endpoint"`
Auth string `yaml:"auth_env_var"`
OrgID string `yaml:"org_env_var,omitempty"`
ProjectID string `yaml:"project_env_var,omitempty"`
Prompt []Message `yaml:"prompt"`
}

Expand Down