Skip to content

Latest commit

 

History

History
520 lines (349 loc) · 26.9 KB

README.md

File metadata and controls

520 lines (349 loc) · 26.9 KB

CirclemindSDK

Overview

Available Operations

get_user_plan_plan_get

Return the active plan for the current user and its usage metrics.

Example Usage

from circlemind_sdk import CirclemindSDK
import os

with CirclemindSDK(
    api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
) as circlemind_sdk:

    res = circlemind_sdk.get_user_plan_plan_get()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.PlanResponse

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*

get_graph_configuration

Retrieve the configuration details of a specific graph by its name.

Example Usage

from circlemind_sdk import CirclemindSDK
import os

with CirclemindSDK(
    api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
) as circlemind_sdk:

    res = circlemind_sdk.get_graph_configuration(graph_name="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
graph_name str ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ConfigureResponse

Errors

Error Type Status Code Content Type
models.HTTPValidationError 422 application/json
models.SDKError 4XX, 5XX */*

set_graph_configuration

Update the configuration details of a specific graph by its name.

Example Usage

from circlemind_sdk import CirclemindSDK
import os

with CirclemindSDK(
    api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
) as circlemind_sdk:

    res = circlemind_sdk.set_graph_configuration(graph_name="<value>", configure_request={
        "domain": "agitated-cod.name",
        "example_queries": "<value>",
        "entity_types": [
            "<value>",
        ],
    })

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
graph_name str ✔️ N/A
configure_request models.ConfigureRequest ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ConfigureResponse

Errors

Error Type Status Code Content Type
models.HTTPValidationError 422 application/json
models.SDKError 4XX, 5XX */*

list_graphs

Return the list of all existing graphs for the current user.

Example Usage

from circlemind_sdk import CirclemindSDK
import os

with CirclemindSDK(
    api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
) as circlemind_sdk:

    res = circlemind_sdk.list_graphs()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.GraphListResponse

Errors

Error Type Status Code Content Type
models.SDKError 4XX, 5XX */*

create_graph

Create a new graph

Example Usage

from circlemind_sdk import CirclemindSDK
import os

with CirclemindSDK(
    api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
) as circlemind_sdk:

    res = circlemind_sdk.create_graph(graph_name="<value>", configure_request={
        "domain": "liquid-godfather.org",
        "example_queries": "<value>",
        "entity_types": [
            "<value>",
            "<value>",
            "<value>",
        ],
    })

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
graph_name str ✔️ N/A
configure_request models.ConfigureRequest ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ConfigureResponse

Errors

Error Type Status Code Content Type
models.HTTPValidationError 422 application/json
models.SDKError 4XX, 5XX */*

delete_graph

Delete the selected graph.

Example Usage

from circlemind_sdk import CirclemindSDK
import os

with CirclemindSDK(
    api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
) as circlemind_sdk:

    res = circlemind_sdk.delete_graph(graph_name="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
graph_name str ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

Any

Errors

Error Type Status Code Content Type
models.HTTPValidationError 422 application/json
models.SDKError 4XX, 5XX */*

download_graphml

Generate a download URL for the graph in graphml format.

Example Usage

from circlemind_sdk import CirclemindSDK
import os

with CirclemindSDK(
    api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
) as circlemind_sdk:

    res = circlemind_sdk.download_graphml(graph_name="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
graph_name str ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.DownloadGraphResponse

Errors

Error Type Status Code Content Type
models.HTTPValidationError 422 application/json
models.SDKError 4XX, 5XX */*

query

Send a query request to the graph.

Example Usage

from circlemind_sdk import CirclemindSDK
import os

with CirclemindSDK(
    api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
) as circlemind_sdk:

    res = circlemind_sdk.query(graph_name="<value>", query_request={
        "query": "<value>",
    })

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
graph_name str ✔️ N/A
query_request models.QueryRequest ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.QueryResponse

Errors

Error Type Status Code Content Type
models.HTTPValidationError 422 application/json
models.SDKError 4XX, 5XX */*

get_query_status

Return the status of an existing query request.

Example Usage

from circlemind_sdk import CirclemindSDK
import os

with CirclemindSDK(
    api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
) as circlemind_sdk:

    res = circlemind_sdk.get_query_status(graph_name="<value>", request_id="<id>", request_time=816039)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
graph_name str ✔️ N/A
request_id str ✔️ N/A
request_time int ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.RequestStatus

Errors

Error Type Status Code Content Type
models.HTTPValidationError 422 application/json
models.SDKError 4XX, 5XX */*

add

Create a new memory in the graph using raw text.

Example Usage

from circlemind_sdk import CirclemindSDK
import os

with CirclemindSDK(
    api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
) as circlemind_sdk:

    res = circlemind_sdk.add(graph_name="<value>", insert_request={
        "memory": "<value>",
    })

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
graph_name str ✔️ N/A
insert_request models.InsertRequest ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.InsertResponse

Errors

Error Type Status Code Content Type
models.HTTPValidationError 422 application/json
models.SDKError 4XX, 5XX */*

add_from_files

Create a new memory in the graph from files.

Example Usage

from circlemind_sdk import CirclemindSDK
import os

with CirclemindSDK(
    api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
) as circlemind_sdk:

    res = circlemind_sdk.add_from_files(graph_name="<value>", body_post_insert_files_graph_graph_name_files_post={
        "files": [
            {
                "file_name": "example.file",
                "content": open("example.file", "rb"),
            },
            {
                "file_name": "example.file",
                "content": open("example.file", "rb"),
            },
        ],
    })

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
graph_name str ✔️ N/A
body_post_insert_files_graph_graph_name_files_post models.BodyPostInsertFilesGraphGraphNameFilesPost ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.InsertResponse

Errors

Error Type Status Code Content Type
models.HTTPValidationError 422 application/json
models.SDKError 4XX, 5XX */*

get_add_status

Return the status of an existing add request.

Example Usage

from circlemind_sdk import CirclemindSDK
import os

with CirclemindSDK(
    api_key_header=os.getenv("CIRCLEMINDSDK_API_KEY_HEADER", ""),
) as circlemind_sdk:

    res = circlemind_sdk.get_add_status(graph_name="<value>", request_id="<id>", request_time=877284)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
graph_name str ✔️ N/A
request_id str ✔️ N/A
request_time int ✔️ N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.RequestStatus

Errors

Error Type Status Code Content Type
models.HTTPValidationError 422 application/json
models.SDKError 4XX, 5XX */*