Skip to main content

A set of AI tools for working with Cognite Data Fusion in Python.

Project description

cognite-ai

A set of AI tools for working with CDF in Python.

MemoryVectorStore

Store and query vector embeddings created from CDF. This can enable a bunch of use cases where the number of vectors aren't that big.

Install the package

%pip install cognite-ai

Then you can create vectors from text (both multiple lines or a list of strings) like this

from cognite.ai import MemoryVectorStore
vector_store = MemoryVectorStore(client)

vector_store.store_text("Hi, I am a software engineer working for Cognite.")
vector_store.store_text("The moon is orbiting the earth, which is orbiting the sun.")
vector_store.store_text("Coffee can be a great way to stay awake.")

vector_store.query_text("I am tired, what can I do?")

Smart data frames

Chat with your data using LLMs. Built on top of PandasAI If you have loaded data into a Pandas dataframe, you can run

Install the package

%pip install cognite-ai

Chat with your data

from cognite.ai import load_pandasai
SmartDataframe, SmartDatalake = await load_pandasai()

workorders_df = client.raw.rows.retrieve_dataframe("tutorial_apm", "workorders", limit=-1).to_pandas()
workitems_df = client.raw.rows.retrieve_dataframe("tutorial_apm", "workitems", limit=-1).to_pandas()
workorder2items_df = client.raw.rows.retrieve_dataframe("tutorial_apm", "workorder2items", limit=-1).to_pandas()
workorder2assets_df = client.raw.rows.retrieve_dataframe("tutorial_apm", "workorder2assets", limit=-1).to_pandas()
assets_df = client.raw.rows.retrieve_dataframe("tutorial_apm", "assets", limit=-1).to_pandas()

from cognite.client import CogniteClient
client = CogniteClient()

smart_lake_df = SmartDatalake([workorders_df, workitems_df, assets_df, workorder2items_df, workorder2assets_df], cognite_client=client)
smart_lake_df.chat("Which workorders are the longest, and what work items do they have?")


s_workorders_df = SmartDataframe(workorders_df, cognite_client=client)
s_workorders_df.chat('Which 5 work orders are the longest?')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cognite_ai-0.2.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

cognite_ai-0.2.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file cognite_ai-0.2.2.tar.gz.

File metadata

  • Download URL: cognite_ai-0.2.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for cognite_ai-0.2.2.tar.gz
Algorithm Hash digest
SHA256 767e09f7332dc547a7bdb186684001204f310b3de919d831043830f0e64b370b
MD5 54d9a28a2e07c5955dc51b6f43367c08
BLAKE2b-256 fe238cf7033301b7034b2f2a554762fa41f408ee72f21cc6dea0012c746b7ea7

See more details on using hashes here.

File details

Details for the file cognite_ai-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: cognite_ai-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for cognite_ai-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9a9d4e2ef7bea3f0b0592a303db6d31e4945a11f0377f93ec943003a1e7b8d3e
MD5 3cda829efb5d997feb909073fc8b5195
BLAKE2b-256 70af42f0762d9cf128ae10e003407e59a5ba9d96dc888fbb94aeab611827934a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page