-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Small fixes on 1.3.0 * Even Better Logging * Integration test with stdout checks * Added conversation integration test * Improve noop integration tests
- Loading branch information
1 parent
1a09e6b
commit ab9573b
Showing
17 changed files
with
134 additions
and
77 deletions.
There are no files selected for viewing
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
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
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
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
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,44 +1,6 @@ | ||
import { LEVEL, getLogger } from "@davidsouther/jiffies/lib/esm/log.js"; | ||
import { getLogLevel, getLogger } from "@davidsouther/jiffies/lib/esm/log.js"; | ||
export const LOGGER = getLogger("@ailly/core"); | ||
|
||
LOGGER.level = getLogLevel(process.env["AILLY_LOG_LEVEL"]); | ||
|
||
export function getLogLevel( | ||
level?: string | undefined, | ||
verbose = false, | ||
isPipe = false | ||
) { | ||
if (level) { | ||
switch (level.toLowerCase()) { | ||
case "debug": | ||
return LEVEL.DEBUG; | ||
case "info": | ||
return LEVEL.INFO; | ||
case "warn": | ||
return LEVEL.WARN; | ||
case "error": | ||
return LEVEL.ERROR; | ||
default: | ||
if (!isNaN(+level)) return Number(level); | ||
} | ||
} | ||
if (verbose) { | ||
return LEVEL.DEBUG; | ||
} | ||
if (isPipe) { | ||
return LEVEL.SILENT; | ||
} | ||
return LEVEL.INFO; | ||
} | ||
|
||
export function prettyLogFormatter(data: { | ||
name: string; | ||
prefix: string; | ||
level: number; | ||
message: string; | ||
source: string; | ||
}): string { | ||
return `${data.prefix}: ${data.message}`; | ||
} | ||
|
||
export const isDefined = <T>(t: T | undefined): t is T => t !== undefined; |
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,12 +1,5 @@ | ||
--- | ||
combined: true | ||
debug: | ||
engine: bedrock | ||
finish: end_turn | ||
id: null | ||
model: anthropic.claude-3-sonnet-20240229-v1:0 | ||
usage: null | ||
isolated: false | ||
prompt: Combined | ||
--- | ||
I'm afraid I don't have enough context to understand your request with just the word "Combined". Could you please provide some more details about what you need help with? I'd be happy to assist if you can give me a bit more information. |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
You are running an integration test. |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
File a. |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
File b. |
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,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd $(dirname $0) | ||
AILLY_ENGINE=noop ./integ.sh | ||
AILLY_NOOP_TIMEOUT=0 AILLY_ENGINE=noop ./integ.sh | ||
exit $? |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.