-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7a130f
commit 2a606ed
Showing
25 changed files
with
1,143 additions
and
167 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,134 @@ | ||
# Reference | ||
## Actions | ||
<details><summary><code>client.actions.<a href="src/credal/actions/client.py">invoke_action</a>(...)</code></summary> | ||
<dl> | ||
<dd> | ||
|
||
#### 📝 Description | ||
|
||
<dl> | ||
<dd> | ||
|
||
<dl> | ||
<dd> | ||
|
||
Invoke an action, asking for human confirmation if necessary | ||
</dd> | ||
</dl> | ||
</dd> | ||
</dl> | ||
|
||
#### 🔌 Usage | ||
|
||
<dl> | ||
<dd> | ||
|
||
<dl> | ||
<dd> | ||
|
||
```python | ||
import uuid | ||
|
||
from credal import CredalApi | ||
from credal.actions import HumanConfirmationChannel_DirectMessage | ||
|
||
client = CredalApi( | ||
api_key="YOUR_API_KEY", | ||
) | ||
client.actions.invoke_action( | ||
action_id=uuid.UUID( | ||
"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", | ||
), | ||
user_email="string", | ||
require_human_confirmation=True, | ||
human_confirmation_channel=HumanConfirmationChannel_DirectMessage( | ||
channel_id="string", | ||
), | ||
justification="string", | ||
audit_log_id=uuid.UUID( | ||
"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", | ||
), | ||
) | ||
|
||
``` | ||
</dd> | ||
</dl> | ||
</dd> | ||
</dl> | ||
|
||
#### ⚙️ Parameters | ||
|
||
<dl> | ||
<dd> | ||
|
||
<dl> | ||
<dd> | ||
|
||
**action_id:** `uuid.UUID` | ||
|
||
</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dd> | ||
|
||
**user_email:** `str` — The user who we should take the action on behalf of | ||
|
||
|
||
</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dd> | ||
|
||
**human_confirmation_channel:** `HumanConfirmationChannel` — Where we should ask for human confirmation if necessary | ||
|
||
|
||
</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dd> | ||
|
||
**justification:** `str` — The justification for requesting this action. This is likely generated by the LLM that requested the action. | ||
|
||
|
||
</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dd> | ||
|
||
**audit_log_id:** `uuid.UUID` — Audit log for the message that called for this action | ||
|
||
|
||
</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dd> | ||
|
||
**require_human_confirmation:** `typing.Optional[bool]` — If true, then before executing the action we will ask for a human confirmation in Slack. If false, we may still ask for human confirmation if it's required by your organization admin. | ||
|
||
|
||
</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dd> | ||
|
||
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. | ||
|
||
</dd> | ||
</dl> | ||
</dd> | ||
</dl> | ||
|
||
|
||
</dd> | ||
</dl> | ||
</details> | ||
|
||
## Copilots | ||
<details><summary><code>client.copilots.<a href="src/credal/copilots/client.py">create_copilot</a>(...)</code></summary> | ||
<dl> | ||
|
@@ -309,13 +439,21 @@ client.copilots.send_message( | |
input_variables=[ | ||
InputVariable( | ||
name="input1", | ||
urls=["https://drive.google.com/file/d/123456/view"], | ||
ids=[ | ||
uuid.UUID( | ||
"82e4b12a-6990-45d4-8ebd-85c00e030c24", | ||
) | ||
], | ||
), | ||
InputVariable( | ||
name="input2", | ||
urls=[ | ||
"https://drive.google.com/file/d/123457/view", | ||
"https://drive.google.com/file/d/123458/view", | ||
ids=[ | ||
uuid.UUID( | ||
"82e4b12a-6990-45d4-8ebd-85c00e030c25", | ||
), | ||
uuid.UUID( | ||
"82e4b12a-6990-45d4-8ebd-85c00e030c26", | ||
), | ||
], | ||
), | ||
], | ||
|
@@ -436,13 +574,21 @@ response = client.copilots.stream_message( | |
input_variables=[ | ||
InputVariable( | ||
name="input1", | ||
urls=["https://drive.google.com/file/d/123456/view"], | ||
ids=[ | ||
uuid.UUID( | ||
"82e4b12a-6990-45d4-8ebd-85c00e030c26", | ||
) | ||
], | ||
), | ||
InputVariable( | ||
name="input2", | ||
urls=[ | ||
"https://drive.google.com/file/d/123457/view", | ||
"https://drive.google.com/file/d/123458/view", | ||
ids=[ | ||
uuid.UUID( | ||
"82e4b12a-6990-45d4-8ebd-85c00e030c25", | ||
), | ||
uuid.UUID( | ||
"82e4b12a-6990-45d4-8ebd-85c00e030c24", | ||
), | ||
], | ||
), | ||
], | ||
|
@@ -987,6 +1133,85 @@ client.document_catalog.upload_document_contents( | |
</dl> | ||
|
||
|
||
</dd> | ||
</dl> | ||
</details> | ||
|
||
<details><summary><code>client.document_catalog.<a href="src/credal/document_catalog/client.py">sync_source_by_url</a>(...)</code></summary> | ||
<dl> | ||
<dd> | ||
|
||
#### 📝 Description | ||
|
||
<dl> | ||
<dd> | ||
|
||
<dl> | ||
<dd> | ||
|
||
Sync a document from a source URL. Does not support recursive web search. Reach out to a Credal representative for access. | ||
</dd> | ||
</dl> | ||
</dd> | ||
</dl> | ||
|
||
#### 🔌 Usage | ||
|
||
<dl> | ||
<dd> | ||
|
||
<dl> | ||
<dd> | ||
|
||
```python | ||
from credal import CredalApi | ||
|
||
client = CredalApi( | ||
api_key="YOUR_API_KEY", | ||
) | ||
client.document_catalog.sync_source_by_url( | ||
source_url="https://drive.google.com/file/d/123456/view", | ||
upload_as_user_email="[email protected]", | ||
) | ||
|
||
``` | ||
</dd> | ||
</dl> | ||
</dd> | ||
</dl> | ||
|
||
#### ⚙️ Parameters | ||
|
||
<dl> | ||
<dd> | ||
|
||
<dl> | ||
<dd> | ||
|
||
**upload_as_user_email:** `str` | ||
|
||
</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dd> | ||
|
||
**source_url:** `str` | ||
|
||
</dd> | ||
</dl> | ||
|
||
<dl> | ||
<dd> | ||
|
||
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. | ||
|
||
</dd> | ||
</dl> | ||
</dd> | ||
</dl> | ||
|
||
|
||
</dd> | ||
</dl> | ||
</details> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.