Skip to main content

llama-index readers airbyte_zendesk_support integration

Project description

Airbyte ZendeskSupport Loader

pip install llama-index-readers-airbyte-zendesk-support

The Airbyte ZendeskSupport Loader allows you to access different ZendeskSupport objects.

Usage

Here's an example usage of the AirbyteZendeskSupportReader.

from llama_index.readers.airbyte_zendesk_support import (
    AirbyteZendeskSupportReader,
)

zendesk_support_config = {
    # ...
}
reader = AirbyteZendeskSupportReader(config=zendesk_support_config)
documents = reader.load_data(stream_name="tickets")

Configuration

Check out the Airbyte documentation page for details about how to configure the reader. The JSON schema the config object should adhere to can be found on Github: https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-zendesk-support/source_zendesk_support/spec.json.

The general shape looks like this:

{
    "subdomain": "<your zendesk subdomain>",
    "start_date": "<date from which to start retrieving records from in ISO format, e.g. 2020-10-20T00:00:00Z>",
    "credentials": {
        "credentials": "api_token",
        "email": "<your email>",
        "api_token": "<your api token>",
    },
}

By default all fields are stored as metadata in the documents and the text is set to the JSON representation of all the fields. Construct the text of the document by passing a record_handler to the reader:

def handle_record(record, id):
    return Document(
        doc_id=id, text=record.data["title"], extra_info=record.data
    )


reader = AirbyteZendeskSupportReader(
    config=zendesk_support_config, record_handler=handle_record
)

Lazy loads

The reader.load_data endpoint will collect all documents and return them as a list. If there are a large number of documents, this can cause issues. By using reader.lazy_load_data instead, an iterator is returned which can be consumed document by document without the need to keep all documents in memory.

Incremental loads

This loader supports loading data incrementally (only returning documents that weren't loaded last time or got updated in the meantime):

reader = AirbyteZendeskSupportReader(config={...})
documents = reader.load_data(stream_name="tickets")
current_state = reader.last_state  # can be pickled away or stored otherwise

updated_documents = reader.load_data(
    stream_name="tickets", state=current_state
)  # only loads documents that were updated since last time

This loader is designed to be used as a way to load data into LlamaIndex.

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

Built Distribution

File details

Details for the file llama_index_readers_airbyte_zendesk_support-0.3.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_airbyte_zendesk_support-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d6918d7b3be49bdbd92a7e789b2e59fe22e9c9f5f01664018db59f617623e4b8
MD5 44d252254f14fcafc4d3545c914aa6ad
BLAKE2b-256 438ee16108cc179ff014ac45f3476693152d774ced945bc5cdab5918d6ff048d

See more details on using hashes here.

File details

Details for the file llama_index_readers_airbyte_zendesk_support-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_airbyte_zendesk_support-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 793d59cba66e6d67b9e3763d6efcac0a7439cfde117f9c8c5d4fdba89eed1f8c
MD5 f50031459ec1a943ddee409ea6164a17
BLAKE2b-256 b3896d0a85fb38e0d3efbc5c2e9c8af62ffb7d05990edf8de87f3259d9205c40

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