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

Issue with running locally #36

Closed
sutyum opened this issue Jun 1, 2024 · 2 comments · Fixed by #39
Closed

Issue with running locally #36

sutyum opened this issue Jun 1, 2024 · 2 comments · Fixed by #39
Assignees
Labels
BUG Something isn't working
Milestone

Comments

@sutyum
Copy link
Member

sutyum commented Jun 1, 2024

>>> from personal_graph.graph import GraphDB, OllamaClient, OllamaEmbeddingClient
from personal_graph.graph_generator import OpenAITextToGraphParser
from personal_graph.database import SQLite
from personal_graph.vector_store import VliteVSS

phi3 = OllamaClient(model_name="phi3")
nomic_embed = OllamaEmbeddingClient(model_name="nomic-embed-text")

storage_db = SQLite(local_path="./local.db", vector0_so_path="/path/to/vector0/extension", vss0_so_path="/path/to/vss0/extension")
vector_store = VliteVSS(collection="./vectors")

graph_generator=OpenAITextToGraphParser(llm_client=phi3)
print(graph_generator) # Should print the InstructorGraphGenerator

with GraphDB(
    database=storage_db,
    vector_store=vector_store,
    graph_generator=graph_generator
  ) as db:
    print(db)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'OllamaClient' from 'personal_graph.graph' (/Users/satyamtiwary/Documents/Pytorch-Things/personal-graph/personal_graph/graph.py)
>>> from personal_graph.graph_generator import OpenAITextToGraphParser
>>> from personal_graph.database import SQLite
>>> from personal_graph.vector_store import VliteVSS
>>>
>>> phi3 = OllamaClient(model_name="phi3")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'OllamaClient' is not defined
>>> nomic_embed = OllamaEmbeddingClient(model_name="nomic-embed-text")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'OllamaEmbeddingClient' is not defined
>>>
>>> storage_db = SQLite(local_path="./local.db", vector0_so_path="/path/to/vector0/extension", vss0_so_path="/path/to/vss0/extension")
>>> vector_store = VliteVSS(collection="./vectors")
>>>
>>> graph_generator=OpenAITextToGraphParser(llm_client=phi3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'phi3' is not defined
>>> print(graph_generator) # Should print the InstructorGraphGenerator
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'graph_generator' is not defined
>>>
>>> with GraphDB(
...     database=storage_db,
...     vector_store=vector_store,
...     graph_generator=graph_generator
...   ) as db:
...     print(db)
...
Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
NameError: name 'graph_generator' is not defined
@sutyum sutyum added the BUG Something isn't working label Jun 1, 2024
@sutyum sutyum added this to the User Memories milestone Jun 1, 2024
@sutyum
Copy link
Member Author

sutyum commented Jun 3, 2024

Also would need to update storage_db = SQLite(local_path="./local.db", vector0_so_path="/path/to/vector0/extension", vss0_so_path="/path/to/vss0/extension") to storage_db = SQLite(local_path="./local.db") in the README

@anubhuti24
Copy link
Collaborator

Also would need to update storage_db = SQLite(local_path="./local.db", vector0_so_path="/path/to/vector0/extension", vss0_so_path="/path/to/vss0/extension") to storage_db = SQLite(local_path="./local.db") in the README

Since, this is just a data storage we can remove these paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants