Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "credal"

[tool.poetry]
name = "credal"
version = "0.1.0"
version = "0.1.1"
description = ""
readme = "README.md"
authors = []
Expand Down
8 changes: 4 additions & 4 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ client = CredalApi(
)
client.document_catalog.upload_document_contents(
document_name="My Document",
document_contents="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
document_contents="Lorem ipsum...",
document_external_id="73eead26-d124-4940-b329-5f068a0a8db9",
allowed_users_email_addresses=["[email protected]", "[email protected]"],
upload_as_user_email="[email protected]",
Expand Down Expand Up @@ -930,7 +930,7 @@ client.document_catalog.upload_document_contents(
<dl>
<dd>

**custom_metadata:** `typing.Optional[typing.Optional[typing.Any]]` — Optional JSON representing any custom metdata for this document
**custom_metadata:** `typing.Optional[typing.Optional[typing.Any]]` — Optional JSON representing any custom metadata for this document

</dd>
</dl>
Expand Down Expand Up @@ -1543,7 +1543,7 @@ client = CredalApi(
api_key="YOUR_API_KEY",
)
client.document_collections.create_mongo_collection_sync(
mongo_uri="mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
mongo_uri="mongodb+srv://cluster0.abcdefg.mongodb.net/Cluster0?retryWrites=true&w=majority",
collection_id=uuid.UUID(
"ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
),
Expand Down Expand Up @@ -1649,7 +1649,7 @@ client = CredalApi(
api_key="YOUR_API_KEY",
)
client.document_collections.update_mongo_collection_sync(
mongo_uri="mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
mongo_uri="mongodb+srv://cluster0.abcdefg.mongodb.net/Cluster0?retryWrites=true&w=majority",
mongo_credential_id=uuid.UUID(
"5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
),
Expand Down
3 changes: 3 additions & 0 deletions src/credal/copilots/types/response_chunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
class ResponseChunk(UniversalBaseModel):
message: str
data_chunk: typing_extensions.Annotated[str, FieldMetadata(alias="dataChunk")]
structured_output: typing_extensions.Annotated[
typing.Optional[typing.Optional[typing.Any]], FieldMetadata(alias="structuredOutput")
] = None

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
Expand Down
4 changes: 2 additions & 2 deletions src/credal/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def __init__(

def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"User-Agent": "credal/0.1.0",
"User-Agent": "credal/0.1.1",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "credal",
"X-Fern-SDK-Version": "0.1.0",
"X-Fern-SDK-Version": "0.1.1",
**(self.get_custom_headers() or {}),
}
headers["Authorization"] = f"Bearer {self._get_api_key()}"
Expand Down
8 changes: 4 additions & 4 deletions src/credal/document_catalog/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def upload_document_contents(
The external URL of the document you want to upload. If provided Credal will link to this URL.

custom_metadata : typing.Optional[typing.Optional[typing.Any]]
Optional JSON representing any custom metdata for this document
Optional JSON representing any custom metadata for this document

collection_id : typing.Optional[str]
If specified, document will also be added to a particular document collection
Expand All @@ -92,7 +92,7 @@ def upload_document_contents(
)
client.document_catalog.upload_document_contents(
document_name="My Document",
document_contents="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
document_contents="Lorem ipsum...",
document_external_id="73eead26-d124-4940-b329-5f068a0a8db9",
allowed_users_email_addresses=["[email protected]", "[email protected]"],
upload_as_user_email="[email protected]",
Expand Down Expand Up @@ -259,7 +259,7 @@ async def upload_document_contents(
The external URL of the document you want to upload. If provided Credal will link to this URL.

custom_metadata : typing.Optional[typing.Optional[typing.Any]]
Optional JSON representing any custom metdata for this document
Optional JSON representing any custom metadata for this document

collection_id : typing.Optional[str]
If specified, document will also be added to a particular document collection
Expand Down Expand Up @@ -291,7 +291,7 @@ async def upload_document_contents(
async def main() -> None:
await client.document_catalog.upload_document_contents(
document_name="My Document",
document_contents="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
document_contents="Lorem ipsum...",
document_external_id="73eead26-d124-4940-b329-5f068a0a8db9",
allowed_users_email_addresses=["[email protected]", "[email protected]"],
upload_as_user_email="[email protected]",
Expand Down
4 changes: 2 additions & 2 deletions src/credal/document_catalog/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def upload_document_contents(
The external URL of the document you want to upload. If provided Credal will link to this URL.

custom_metadata : typing.Optional[typing.Optional[typing.Any]]
Optional JSON representing any custom metdata for this document
Optional JSON representing any custom metadata for this document

collection_id : typing.Optional[str]
If specified, document will also be added to a particular document collection
Expand Down Expand Up @@ -238,7 +238,7 @@ async def upload_document_contents(
The external URL of the document you want to upload. If provided Credal will link to this URL.

custom_metadata : typing.Optional[typing.Optional[typing.Any]]
Optional JSON representing any custom metdata for this document
Optional JSON representing any custom metadata for this document

collection_id : typing.Optional[str]
If specified, document will also be added to a particular document collection
Expand Down
8 changes: 4 additions & 4 deletions src/credal/document_collections/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def create_mongo_collection_sync(
api_key="YOUR_API_KEY",
)
client.document_collections.create_mongo_collection_sync(
mongo_uri="mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
mongo_uri="mongodb+srv://cluster0.abcdefg.mongodb.net/Cluster0?retryWrites=true&w=majority",
collection_id=uuid.UUID(
"ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
),
Expand Down Expand Up @@ -334,7 +334,7 @@ def update_mongo_collection_sync(
api_key="YOUR_API_KEY",
)
client.document_collections.update_mongo_collection_sync(
mongo_uri="mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
mongo_uri="mongodb+srv://cluster0.abcdefg.mongodb.net/Cluster0?retryWrites=true&w=majority",
mongo_credential_id=uuid.UUID(
"5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
),
Expand Down Expand Up @@ -649,7 +649,7 @@ async def create_mongo_collection_sync(

async def main() -> None:
await client.document_collections.create_mongo_collection_sync(
mongo_uri="mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
mongo_uri="mongodb+srv://cluster0.abcdefg.mongodb.net/Cluster0?retryWrites=true&w=majority",
collection_id=uuid.UUID(
"ac20e6ba-0bae-11ef-b25a-efca73df4c3a",
),
Expand Down Expand Up @@ -718,7 +718,7 @@ async def update_mongo_collection_sync(

async def main() -> None:
await client.document_collections.update_mongo_collection_sync(
mongo_uri="mongodb+srv://cluster0.hzwklqn.mongodb.net/Cluster0?retryWrites=true&w=majority",
mongo_uri="mongodb+srv://cluster0.abcdefg.mongodb.net/Cluster0?retryWrites=true&w=majority",
mongo_credential_id=uuid.UUID(
"5988ed76-6ee1-11ef-97dd-1fca54b7c4bc",
),
Expand Down