Skip to main content

API calls to 'llama' models without dependencies.

Project description

Camelids are large herbivorous mammals in the family Camelidae.

  pip install camelids

Then:

from yaml import safe_load as yl
from camelids.messages import message

kwargs = """  # this is a string in YAML format
  max_tokens:   32000
  stop_sequences:
    - STOP
    - "\nTitle"
  temperature:  1.0
  top_k:        10
  top_p:        0.5
  thinking:     
    type: enabled
    budget_tokens: 24576
    display: summarized
  tool_choice:
    type: auto
    disable_parallel_tool_use: false
"""

instruction = 'You are a helpful assistant. Important: Do not use markdown or lists in your responses.'

get_weather_tool_str = """ # messages specific definition.
  name: get_weather
  description: Determine weather in my location
  input_schema:
    type: object
    properties:
      location:
        type: string
        description: The city and state
    additionalProperties: true
    required:
      - location
"""
tools = [yl(get_weather_tool_str)]

msg = [{'role': 'user', 'content': 'What is the weather like in Chicago, IL and Paris, France?'}]

thoughts, text = message(
    messages=msg,
    instructions=instruction,
    tools=tools,
    **yl(kwargs)
)

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

camelids-0.0.15.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

camelids-0.0.15-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file camelids-0.0.15.tar.gz.

File metadata

  • Download URL: camelids-0.0.15.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for camelids-0.0.15.tar.gz
Algorithm Hash digest
SHA256 f7b0d4fac5bb68555467a56ec325765450daa9e7dd7916a87c6b653d2718af08
MD5 a89cb8c5ba022e7346ce247cfe976d43
BLAKE2b-256 c3e5caed3ba8591d6acda6fdcbb4198431a04e7d9813c7267ac53d9c67df91ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for camelids-0.0.15.tar.gz:

Publisher: python-publish.yml on alxfed/camelids

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file camelids-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: camelids-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for camelids-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 f8ca7345253372a94725054d55d87508c716a3357c724d2b3334e1c7d823a5d1
MD5 efabf05dff948ebf7f75c4a9b6c57daa
BLAKE2b-256 da7bb8b5fc7771c604583a3c996423aa328f3073f7923246b9d0101fa4439fe4

See more details on using hashes here.

Provenance

The following attestation bundles were made for camelids-0.0.15-py3-none-any.whl:

Publisher: python-publish.yml on alxfed/camelids

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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