Giter Club home page Giter Club logo

Comments (7)

andrewnguonly avatar andrewnguonly commented on June 1, 2024 2

@vicendominguez do you see any errors in the console for the Chrome extension's background script? Based on the server code, it looks like one of the validation steps is failing. Validation:

  1. request body is set
  2. model is set
  3. model is valid
  4. working directory is set
  5. embedding option is enabled

from lumos.

vicendominguez avatar vicendominguez commented on June 1, 2024 1

@andrewnguonly i found the problem.

TLDR

You need (must) to have llama2 model installed: ollama pull llama2.

CONTEXT

llama2 model was not installed in my ollama serve because my default LLM is mistral.

I was trying to play with this line but the Llama2 model appears to be more integrated within the LangChain node module.

from lumos.

andrewnguonly avatar andrewnguonly commented on June 1, 2024 1

I'll update the README to specify that llama2 is required because of the hardcoded model. Will also include instructions to change the model.

from lumos.

vicendominguez avatar vicendominguez commented on June 1, 2024 1

Not for me @andrewnguonly .....

diff --git a/src/scripts/background.ts b/src/scripts/background.ts
index 4d69d32..15cfb7b 100644
--- a/src/scripts/background.ts
+++ b/src/scripts/background.ts
@@ -9,7 +9,7 @@ import { formatDocumentsAsString } from "langchain/util/document";


 const OLLAMA_BASE_URL = "http://localhost:11434";
-const OLLAMA_MODEL = "llama2";
+const OLLAMA_MODEL = "mistral";
 var context = "";

 chrome.runtime.onMessage.addListener(async function (request) {

Rebuilt, reloaded and inspected from your plugin (network tab). This is the request payload:

{"prompt":"texttextext","model":"llama2"}

That model llama2 has a bad smell....

Two questions:

  • Could the npm build cache anything i don't know? (nodejs is out of my scope sorry)
  • Could you try it again but making a ollama rm llama2 in your environment?

PS: i've updated nodejs to the last versions just in case.

from lumos.

andrewnguonly avatar andrewnguonly commented on June 1, 2024

I was trying to play with this line but the Llama2 model appears to be more integrated within the LangChain node module.

@vicendominguez, I was able to run the extension w/ mistral after downloading the model and changing the hardcoded model value. Were you seeing some other error?

from lumos.

andrewnguonly avatar andrewnguonly commented on June 1, 2024

@vicendominguez

Could the npm build cache anything i don't know? (nodejs is out of my scope sorry)

I don't think so, but try deleting the entire /dist folder and then rerun npm run build to rebuild all the source files.

Could you try it again but making a ollama rm llama2 in your environment?

I tried this and the extension was able to call the API w/ the mistral model. To clarify, I tried w/ both llama2 and mistral downloaded and with only mistral downloaded.

from lumos.

andrewnguonly avatar andrewnguonly commented on June 1, 2024

@vicendominguez, please reopen this issue if you're still unable to get the extension to call the Ollama API w/ the desired model. Thanks.

from lumos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.