Skip to content

Commit

Permalink
fix: Have the == implementation use Object instead of dynamic (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmigloz authored Feb 16, 2024
1 parent 8fad20f commit 89f7b0b
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 26 deletions.
2 changes: 1 addition & 1 deletion packages/chromadb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![](https://dcbadge.vercel.app/api/server/x4qbhqecVR?style=flat)](https://discord.gg/x4qbhqecVR)
[![MIT](https://img.shields.io/badge/license-MIT-purple.svg)](https://github.com/davidmigloz/langchain_dart/blob/main/LICENSE)

Dart client for [Chroma](https://trychroma.com) embedding database.
Unofficial Dart client for [Chroma](https://trychroma.com) embedding database.

## Features

Expand Down
34 changes: 17 additions & 17 deletions packages/chromadb/lib/src/generated/schema/schema.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part of 'schema.dart';
T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

AddEmbedding _$AddEmbeddingFromJson(Map<String, dynamic> json) {
return _AddEmbedding.fromJson(json);
Expand Down Expand Up @@ -255,7 +255,7 @@ class _$AddEmbeddingImpl extends _AddEmbedding {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$AddEmbeddingImpl &&
Expand Down Expand Up @@ -491,7 +491,7 @@ class _$CollectionTypeImpl extends _CollectionType {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CollectionTypeImpl &&
Expand Down Expand Up @@ -707,7 +707,7 @@ class _$CreateCollectionImpl extends _CreateCollection {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CreateCollectionImpl &&
Expand Down Expand Up @@ -909,7 +909,7 @@ class _$DatabaseTypeImpl extends _DatabaseType {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DatabaseTypeImpl &&
Expand Down Expand Up @@ -1065,7 +1065,7 @@ class _$CreateDatabaseImpl extends _CreateDatabase {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CreateDatabaseImpl &&
Expand Down Expand Up @@ -1208,7 +1208,7 @@ class _$TenantTypeImpl extends _TenantType {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$TenantTypeImpl &&
Expand Down Expand Up @@ -1349,7 +1349,7 @@ class _$CreateTenantImpl extends _CreateTenant {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CreateTenantImpl &&
Expand Down Expand Up @@ -1574,7 +1574,7 @@ class _$DeleteEmbeddingImpl extends _DeleteEmbedding {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DeleteEmbeddingImpl &&
Expand Down Expand Up @@ -1919,7 +1919,7 @@ class _$GetEmbeddingImpl extends _GetEmbedding {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$GetEmbeddingImpl &&
Expand Down Expand Up @@ -2225,7 +2225,7 @@ class _$GetResponseImpl extends _GetResponse {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$GetResponseImpl &&
Expand Down Expand Up @@ -2412,7 +2412,7 @@ class _$HTTPValidationErrorImpl extends _HTTPValidationError {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$HTTPValidationErrorImpl &&
Expand Down Expand Up @@ -2694,7 +2694,7 @@ class _$QueryEmbeddingImpl extends _QueryEmbedding {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$QueryEmbeddingImpl &&
Expand Down Expand Up @@ -3088,7 +3088,7 @@ class _$QueryResponseImpl extends _QueryResponse {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$QueryResponseImpl &&
Expand Down Expand Up @@ -3328,7 +3328,7 @@ class _$UpdateCollectionImpl extends _UpdateCollection {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$UpdateCollectionImpl &&
Expand Down Expand Up @@ -3624,7 +3624,7 @@ class _$UpdateEmbeddingImpl extends _UpdateEmbedding {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$UpdateEmbeddingImpl &&
Expand Down Expand Up @@ -3849,7 +3849,7 @@ class _$ValidationErrorImpl extends _ValidationError {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ValidationErrorImpl &&
Expand Down
2 changes: 1 addition & 1 deletion packages/chromadb/lib/src/generated/schema/schema.g.dart

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

2 changes: 0 additions & 2 deletions packages/googleai_dart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ Refer to the [documentation](https://ai.google.dev/docs) for more information ab

The Google AI API uses API keys for authentication. Visit [Google AI Studio dashboard](https://makersuite.google.com/app/apikey) page to retrieve the API key you'll use in your requests.

> [!CAUTION]
> **Remember that your API key is a secret!**
> Do not share it with others or expose it in any client-side code (browsers, apps). Production requests must be routed through your own backend server where your API key can be securely loaded from an environment variable or key management service.
Expand Down Expand Up @@ -123,7 +122,6 @@ print(res.candidates?.first.content?.parts?.first.text);

Using Gemini, you can build freeform conversations across multiple turns.

> [!NOTE]
> The gemini-pro-vision model (for text-and-image input) is not yet optimized for multi-turn conversations.
> Make sure to use gemini-pro and text-only input for chat use cases.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part of 'schema.dart';
T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

TuningSnapshot _$TuningSnapshotFromJson(Map<String, dynamic> json) {
return _TuningSnapshot.fromJson(json);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part of 'schema.dart';
T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

ChatCompletionRequest _$ChatCompletionRequestFromJson(
Map<String, dynamic> json) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part of 'schema.dart';
T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

GenerateCompletionRequest _$GenerateCompletionRequestFromJson(
Map<String, dynamic> json) {
Expand Down
2 changes: 1 addition & 1 deletion packages/openai_dart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Unofficial Dart client for [OpenAI](https://platform.openai.com/docs/api-referen

- Generated from the official OpenAI [OpenAPI specification](https://github.com/openai/openai-openapi)
- Fully type-safe, [documented](https://pub.dev/documentation/openai_dart/latest/) and tested
- All platforms supported (including streaming on web)
- All platforms supported
- Authentication with organization support
- Custom base URL, headers and query params support (e.g. HTTP proxies)
- Custom HTTP client support (e.g. SOCKS5 proxies or advanced use cases)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part of 'schema.dart';
T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

CreateCompletionRequest _$CreateCompletionRequestFromJson(
Map<String, dynamic> json) {
Expand Down

0 comments on commit 89f7b0b

Please sign in to comment.