Skip to main content

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 version 1.5.8. 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)
workitems_df = client.raw.rows.retrieve_dataframe("tutorial_apm", "workitems", limit=-1)
workorder2items_df = client.raw.rows.retrieve_dataframe("tutorial_apm", "workorder2items", limit=-1)
workorder2assets_df = client.raw.rows.retrieve_dataframe("tutorial_apm", "workorder2assets", limit=-1)
assets_df = client.raw.rows.retrieve_dataframe("tutorial_apm", "assets", limit=-1)

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?')

Configure LLM parameters

params = {
    "model": "gpt-35-turbo",
    "temperature": 0.5
}

s_workorders_df = SmartDataframe(workorders_df, cognite_client=client, params=params)

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.4.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cognite_ai-0.4.3-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cognite_ai-0.4.3.tar.gz
  • Upload date:
  • Size: 5.8 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.4.3.tar.gz
Algorithm Hash digest
SHA256 99c58b837e5b2419225087d244ccdc3612348910546ea17c9773970c0717f905
MD5 b1d81ffa449079423940e89be04c1997
BLAKE2b-256 10cd5c409c984615e9c95eebe4cccda5a364ce3c22670a0517f4a5313f3fac5b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cognite_ai-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 7.3 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.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fe58ea48f14039c956ed702491ed9ca2e9525dad3600955709f790f7bb23ba9d
MD5 b15f3bd004250b7a7aed510aff2dae6c
BLAKE2b-256 3683cce5bc57832b7c62f56320f72075db7013265a5bf6790a0c246ff8bc9de9

See more details on using hashes here.

Release history Release notifications | RSS feed

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.1

2 files

0.6.0

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

This release

0.4.3 This release

2 files

0.4.2

2 files

0.4.1

2 files

0.3.1

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page