Skip to main content

No project description provided

Project description

DALM by Arcee

The Arcee client for executing domain-adpated language model routines

Arcee DALMs

Installation

pip install arcee-py

Authenticating

Your Arcee API key is obtained at app.arcee.ai

In bash:

export ARCEE_API_KEY=********

In notebook:

import os
os.environ["ARCEE_API_KEY"] = "********"

Upload Context

Upload context for your domain adapted langauge model to draw from.

import arcee
arcee.upload_doc("pubmed", doc_name="doc1", doc_text="whoa")
# or
# arcee.upload_docs("pubmed", docs=[{"doc_name": "doc1", "doc_text": "foo"}, {"doc_name": "doc2", "doc_text": "bar"}]

Train DALM

Train a DALM with the context you have uploaded.

import arcee
dalm = arcee.train_dalm("medical_dalm", context="pubmed")

The DALM training procedure trains your model in context and stands up an index for your model to draw from.

DALM Generation

import arcee
med_dalm = arcee.get_dalm("medical_dalm")
med_dalm.generate("What are the components of Scoplamine?")

DALM Retrieval

Retrieve documents for a given query and to view them or plug into a different LLM.

import arcee
med_dalm = arcee.get_dalm("medical_dalm")
med_dalm.retrieve("my query")

Contributing

We use invoke to manage this repo. You don't need to use it, but it simplifies the workflow.

Set up the repo

git clone https://github.com/arcee-ai/arcee-python && cd arcee-python
# optionally setup your virtual environment (recommended)
python -m venv .venv && source .venv/bin/activate
# install repo
pip install invoke
inv install

Format, lint, test

inv format  # run black and ruff
inv lint    # black check, ruff check, mypy
inv test    # pytest

Publishing

We publish in this repo by creating a new release/tag in github. On release, a github action will publish the __version__ of arcee-py that is in arcee/__init__.py

So you need to increase that version before releasing, otherwise it will fail

To create a new release

  1. Open a PR increasing the __version__ of arcee-py. You can manually edit it or run inv uv
  2. Create a new release, with the name being the __version__ of arcee-py

Manual release [not recommended]

We do not recommend this. If you need to, please make the version number an alpha or beta release.
If you need to create a manual release, you can run inv build && inv publish

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

arcee_py-0.0.12.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

arcee_py-0.0.12-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file arcee_py-0.0.12.tar.gz.

File metadata

  • Download URL: arcee_py-0.0.12.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for arcee_py-0.0.12.tar.gz
Algorithm Hash digest
SHA256 e79d6c8b00589996f8a4c92f422bed96f6dd5b45408fb7ec8ac642f1642575cc
MD5 d85d635f0422c5fe97896d0c7ce2abf4
BLAKE2b-256 4d86c881b4c9b9b2f1f5b7dc00188fccb483e98d48fc0a4eccab5809fa3fefce

See more details on using hashes here.

File details

Details for the file arcee_py-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: arcee_py-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for arcee_py-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 5296a8c73dadfc6e08dda17e2238183ed4842e108a4b2373132a60ce9a5d016e
MD5 f105db4009c3ec38800c4bcf861f2406
BLAKE2b-256 ce4da640178dcea3db80b015e26b01eaa7b07e79d52a6a9519f4fed2c3e31377

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