Skip to content

Commit b7db673

Browse files
authoredDec 28, 2024··
Merge branch 'develop' into test-eliza
2 parents b96ffd6 + 7d78fcd commit b7db673

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed
 

‎packages/client-github/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ export class GitHubClient {
8282
`Successfully cloned repository from ${repositoryUrl}`
8383
);
8484
return;
85-
} catch {
85+
} catch (error) {
8686
elizaLogger.error(
8787
`Failed to clone repository from ${repositoryUrl}. Retrying...`,
88+
error
8889
);
8990
retries++;
9091
if (retries === maxRetries) {

‎packages/core/src/embedding.ts

+3-10
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,15 @@ interface EmbeddingOptions {
1414
provider?: string;
1515
}
1616

17-
// Define the providers as a const object
18-
export const EMBEDDING_PROVIDERS = {
17+
export const EmbeddingProvider = {
1918
OpenAI: "OpenAI",
2019
Ollama: "Ollama",
2120
GaiaNet: "GaiaNet",
2221
BGE: "BGE",
2322
} as const;
2423

25-
// Create type from the values
26-
export type EmbeddingProvider = typeof EMBEDDING_PROVIDERS[keyof typeof EMBEDDING_PROVIDERS];
27-
28-
// If you need individual types, use type aliases instead of namespace
29-
export type OpenAIProvider = typeof EMBEDDING_PROVIDERS.OpenAI;
30-
export type OllamaProvider = typeof EMBEDDING_PROVIDERS.Ollama;
31-
export type GaiaNetProvider = typeof EMBEDDING_PROVIDERS.GaiaNet;
32-
export type BGEProvider = typeof EMBEDDING_PROVIDERS.BGE;
24+
export type EmbeddingProviderType =
25+
(typeof EmbeddingProvider)[keyof typeof EmbeddingProvider];
3326

3427
export type EmbeddingConfig = {
3528
readonly dimensions: number;

‎packages/core/src/parsing.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ export const booleanFooter = `Respond with only a YES or a NO.`;
4444
* @returns {boolean|null} - Returns `true` for affirmative inputs, `false` for negative inputs, and `null` for unrecognized inputs or null/undefined.
4545
*/
4646
export const parseBooleanFromText = (text: string) => {
47-
// "NULL", "UNDEFINED"
4847
if (!text) return null; // Handle null or undefined input
4948

50-
const affirmative = ["YES", "Y", "TRUE", "T", "1", "ON", "ENABLE"];
51-
const negative = ["NO", "N", "FALSE", "F", "0", "OFF", "DISABLE"];
49+
const affirmative = ["YES", "Y", "TRUE", "T", "1", "ON", "ENABLE"];
50+
const negative = ["NO", "N", "FALSE", "F", "0", "OFF", "DISABLE"];
5251

5352
const normalizedText = text.trim().toUpperCase();
5453

0 commit comments

Comments
 (0)
Please sign in to comment.