Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Dec 10, 2024
1 parent c7a130f commit 2a606ed
Show file tree
Hide file tree
Showing 25 changed files with 1,143 additions and 167 deletions.
275 changes: 156 additions & 119 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "credal"
version = "0.0.16"
version = "0.0.17"
description = ""
readme = "README.md"
authors = []
Expand Down
241 changes: 233 additions & 8 deletions reference.md
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>
Expand Down Expand Up @@ -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",
),
],
),
],
Expand Down Expand Up @@ -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",
),
],
),
],
Expand Down Expand Up @@ -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>
Expand Down
33 changes: 31 additions & 2 deletions src/credal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# This file was auto-generated by Fern from our API Definition.

from . import common, copilots, document_catalog, document_collections, permissions_service, search, users
from . import actions, common, copilots, document_catalog, document_collections, permissions_service, search, users
from .actions import (
ActionStatus,
Conversation,
DirectMessage,
HumanConfirmationChannel,
HumanConfirmationChannel_Conversation,
HumanConfirmationChannel_DirectMessage,
HumanConfirmationChannel_SlackThread,
InvokeActionResponse,
SlackThread,
)
from .client import AsyncCredalApi, CredalApi
from .common import (
Collaborator,
Expand Down Expand Up @@ -54,7 +65,13 @@
StringFieldSchema,
WebSearchResult,
)
from .document_catalog import DocumentMetadataPatch, DocumentMetadataPatchRequest, UploadDocumentResponse
from .document_catalog import (
DocumentMetadataPatch,
DocumentMetadataPatchRequest,
SyncSourceByUrlRequest,
SyncSourceByUrlResponse,
UploadDocumentResponse,
)
from .document_collections import (
CreateCollectionResponse,
DeleteCollectionResponse,
Expand Down Expand Up @@ -89,6 +106,7 @@

__all__ = [
"Action",
"ActionStatus",
"AiEndpointConfiguration",
"AsyncCredalApi",
"AuthorizedResource",
Expand All @@ -100,6 +118,7 @@
"Collaborator",
"CollectionFilteredData",
"Configuration",
"Conversation",
"CreateCollectionResponse",
"CreateConversationResponse",
"CreateCopilotResponse",
Expand All @@ -110,6 +129,7 @@
"DatetimeFieldSchema",
"DeleteCollectionResponse",
"DeleteCopilotResponse",
"DirectMessage",
"DocumentCollectionSearchOptions",
"DocumentCollectionSearchResult",
"DocumentMetadataPatch",
Expand All @@ -123,9 +143,14 @@
"Filter_String",
"FinalChunk",
"Group",
"HumanConfirmationChannel",
"HumanConfirmationChannel_Conversation",
"HumanConfirmationChannel_DirectMessage",
"HumanConfirmationChannel_SlackThread",
"InitialChunk",
"InputVariable",
"InsertedAuditLog",
"InvokeActionResponse",
"MessageBlocked",
"MessageFeedback",
"MessageReply",
Expand Down Expand Up @@ -154,18 +179,22 @@
"SendMessageResponse_AiResponseResult",
"SendMessageResponse_BlockedResult",
"SingleFieldFilter",
"SlackThread",
"StreamingChunk",
"StreamingChunk_Blocked",
"StreamingChunk_DataChunk",
"StreamingChunk_FinalChunk",
"StreamingChunk_Initial",
"StringFieldSchema",
"SyncSourceByUrlRequest",
"SyncSourceByUrlResponse",
"UploadDocumentResponse",
"Url",
"User",
"UserMetadataPatch",
"WebSearchResult",
"__version__",
"actions",
"common",
"copilots",
"document_catalog",
Expand Down
Loading

0 comments on commit 2a606ed

Please sign in to comment.