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

Trouble with coroutines #74

Open
elimydlarz opened this issue Oct 26, 2024 · 0 comments
Open

Trouble with coroutines #74

elimydlarz opened this issue Oct 26, 2024 · 0 comments

Comments

@elimydlarz
Copy link

elimydlarz commented Oct 26, 2024

I'm using this Python library and it suggests that a minimal use looks something like this:

from graphiti_core import Graphiti

graphiti = Graphiti("bolt://localhost:7687", "neo4j", "password")

results = await graphiti.search('Who was the California Attorney General?')

Here's what I'm doing:

import { python } from "@denosaurs/python";

const { Graphiti } = await python.import("graphiti_core");

const graphiti = await Graphiti(
  GRAPH_DATABASE_URL,
  GRAPH_DATABASE_USER,
  GRAPH_DATABASE_PASS,
);

const search = async (query: string) => {
  const result = await graphiti.search(query);
  console.debug(result);
};

await search("Test search");

As I understand it this should be functionally equivalent, but the result of search is <coroutine object Graphiti.search at 0x11e2ac040> - it seems like using await is not properly resolving the coroutine.

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

No branches or pull requests

1 participant