Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Add example log to LogFile page

Tomas Valenta0b810ac61059
diff --git a/pages/log/[logFileID].tsx b/pages/log/[logFileID].tsx
index 0f50d9a5d..3bf26ba5b 100644
--- a/pages/log/[logFileID].tsx
+++ b/pages/log/[logFileID].tsx
@@ -1,13 +1,17 @@
-import { LogFile, AgentLogs } from 'utils/agentLogs'
+import { AgentLogs, LogFile } from 'utils/agentLogs'
+import testLogs from './logfile.json'
export interface Props {
- logFile: LogFile
- logs: AgentLogs
+ logFile: LogFile & { content: AgentLogs }
}
-function LogFile({
+function LogFile() {
+ const logFile: Props['logFile'] = {
+ id: 'test',
+ name: 'test.json',
+ content: testLogs as any as AgentLogs,
+ }
-}) {
return (
<main className="overflow-hidden flex flex-col max-h-full">
<header className="flex items-center justify-between p-4 sm:p-6 lg:px-8">
diff --git a/pages/log/logfile.json b/pages/log/logfile.json
new file mode 100644
index 000000000..d15215f76
--- /dev/null
+++ b/pages/log/logfile.json
@@ -0,0 +1,43 @@
+{
+ "context": [
+ {
+ "role": "assistant",
+ "content": "this is content",
+ "function_call": {
+ "name": "human_feedback",
+ "arguments": "{\"url\": \"https://www.floatplane.com\", \"question\": \"styling information\"}"
+ }
+ },
+ {
+ "role": "system",
+ "content": "I just performed the previous task for you. Here is the result: Human feedback: try using curl or a similar function to retrieve the information"
+ },
+ {
+ "role": "user",
+ "content": "Determine one function to call. Respond using the JSON schema specified previously:"
+ }
+ ],
+ "functions": [
+ {
+ "name": "execute_python_code",
+ "description": "Create a Python file and execute it",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string",
+ "description": "The Python code to run"
+ },
+ "name": {
+ "type": "string",
+ "description": "A name to be given to the python file"
+ }
+ },
+ "required": [
+ "code",
+ "name"
+ ]
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/utils/agentLogs.ts b/utils/agentLogs.ts
index f3c5ced8a..9529579bf 100644
--- a/utils/agentLogs.ts
+++ b/utils/agentLogs.ts
@@ -9,7 +9,6 @@ export interface LogFile {
}
export interface AgentLogs {
- logFileID: string
context: (SystemContext | UserContext | AssistantContext)[]
functions: {
name: string