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

Update ollama.py #1619

Merged
merged 1 commit into from
Aug 1, 2024
Merged

Update ollama.py #1619

merged 1 commit into from
Aug 1, 2024

Conversation

krescent
Copy link
Contributor

@krescent krescent commented Jul 31, 2024

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #1618

module could not be imported

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

from mem0 import Memory

config = {
    "llm": {
        "provider": "ollama",
        "config": {
            "model": "llama3.1:8b-instruct-q8_0",
            "temperature": 0.1,
            "max_tokens": 20000,
        }
    },
    "embedder": {
        "provider": "ollama",
        "config": {
            "model": "llama3.1:8b-instruct-q8_0",
            "temperature": 0.1,
            "max_tokens": 20000,
        }
    }
}

m = Memory.from_config(config)
result = m.add("Likes to play cricket on weekends", user_id="alice", metadata={"category": "hobbies"})
print(result)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

@CLAassistant
Copy link

CLAassistant commented Jul 31, 2024

CLA assistant check
All committers have signed the CLA.

@Dev-Khant
Copy link
Collaborator

Thanks @krescent for adding this.

@Dev-Khant Dev-Khant merged commit 51092b0 into mem0ai:main Aug 1, 2024
1 check passed
shlokkhemani pushed a commit that referenced this pull request Sep 7, 2024
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.

ModuleNotFoundError: No module named 'llm'
3 participants