Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: use ollama in lastest llamaindex #77

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

thucpn
Copy link
Contributor

@thucpn thucpn commented Feb 20, 2024

No description provided.

Copy link

vercel bot commented Feb 20, 2024

@thucpn is attempting to deploy a commit to the LlamaIndex Team on Vercel.

A member of the Team first needs to authorize it.

@@ -146,15 +151,15 @@ export async function POST(request: NextRequest) {
);
}

const llm = new OpenAI({
model: config.model,
const llm = new Ollama({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thucpn how about if config.model is not one of ALL_AVAILABLE_OPENAI_MODELS, we fall back to Ollama?

@@ -193,5 +202,3 @@ export async function POST(request: NextRequest) {

export const runtime = "nodejs";
export const dynamic = "force-dynamic";
// Set max running time of function, for Vercel Hobby use 10 seconds, see https://vercel.com/docs/functions/serverless-functions/runtimes#maxduration
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants