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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules
node_modules
apps
cofounder/api/db
package-lock.json
4 changes: 3 additions & 1 deletion cofounder/api/.env
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
PORT = 4200

OPENAI_BASE_URL="https://api.openai.com/v1" # Replace with your OpenAI-compatible API base URL if you are using a service similar to OpenAI’s APIs
OPENAI_API_KEY = "REPLACE_WITH_OPENAI_KEY"
OPENAI_MODEL="gpt-4o-mini"
ANTHROPIC_API_KEY = "REPLACE_WITH_ANTHROPIC_KEY"
COFOUNDER_API_KEY = "REPLACE_WITH_COFOUNDER.OPENINTERFACE.AI_KEY"

# llm, can be 'ANTHROPIC' (for claude sonnet 3.5) or 'OPENAI' (uses diff. models for diff. passes)
# make sure there are matching api keys
LLM_PROVIDER = "ANTHROPIC" #"OPENAI"
LLM_PROVIDER = "OPENAI" #"OPENAI"

# should be kept to "text-embedding-3-small" to work with RAG using api.cofounder.openinterface.ai
EMBEDDING_MODEL = "text-embedding-3-small"
Expand Down
3 changes: 2 additions & 1 deletion cofounder/api/utils/openai.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ let openai;
try {
openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
baseURL: process.env.OPENAI_BASE_URL || "https://api.openai.com/v1",
});
} catch (e) {
console.error("utils:openai : " + e);
}

async function inference({
model = `gpt-4o-mini`,
model = process.env.OPENAI_MODEL || `gpt-4o-mini`,
messages,
stream = process.stdout,
}) {
Expand Down