gptscript-ai / knowledge

Knowledge for GPTScript
https://gptscript-ai.github.io/knowledge/
Apache License 2.0
29 stars 14 forks source link

Not able to get any results for queries from html files because of retrieved contents being encoded. #4

Closed sangee2004 closed 6 months ago

sangee2004 commented 6 months ago

Steps to reproduce the problem:

  1. make run from https://github.com/gptscript-ai/knowledge to launch knowledge in server mode.
  2. Copy bin/knowledge to path (/usr/local/bin)
  3. Run the following script to ingest and search a html file
    
    # Set KNOW_SERVER_URL=standalone to use the client in standalone mode (i.e. without a server running)

tools: Create Dataset, sys.find, Ingest, Retrieve

Create a new Knowledge Base Dataset with ID ${id} Then, ingest ${filepath} into the dataset. Then, figure out ${query} from the previously ingested files.


name: create dataset description: Create a new Dataset in the Knowledge Base args: id: ID of the Dataset

!knowledge client create-dataset ${id}


name: ingest description: Ingest a file or all files from a directory into a Knowledge Base Dataset args: id: ID of the Dataset args: filepath: Path to the file or directory to be ingested

!knowledge client ingest ${id} ${filepath}


name: retrieve description: Retrieve information from a Knowledge Base Dataset args: id: ID of the Dataset args: query: Query to be executed against the Knowledge Base Dataset

!knowledge client retrieve ${id} ${query}

4. Ingestion is successful. But i am not able to get any responses for the query even though I see `retrieve` tool return some information. This is the response i get - 

`The dataset "55558" contains issues relating to acorn login, but the retrieved content is encoded and does not directly list specific issues in a readable format.`

**Full debug logs**:

gptscript --disable-cache --debug testknowledge.gpt --id 55558 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html --query "List issues relating to acorn login" { "level": "debug", "logger": "/pkg/loader", "msg": "opened testknowledge.gpt", "time": "2024-04-30T11:18:10-07:00" } { "input": "--id 55558 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html --query List issues relating to acorn login", "level": "debug", "logger": "/pkg/monitor", "msg": "Run started", "program": { "name": "testknowledge.gpt", "entryToolId": "testknowledge.gpt:1", "toolSet": { "sys.find": { "name": "sys.find", "description": "Traverse a directory looking for files that match a pattern in the style of the unix find command", "modelName": "gpt-4-turbo-preview", "internalPrompt": null, "arguments": { "properties": { "directory": { "description": "The directory to search in. The current directory \".\" will be used as the default if no argument is passed", "type": "string" }, "pattern": { "description": "The file pattern to look for. The pattern is a traditional unix glob format with matching any character and ? matching a single character", "type": "string" } }, "type": "object" }, "instructions": "#!sys.find", "id": "sys.find", "source": {} }, "testknowledge.gpt:1": { "modelName": "gpt-4-turbo-preview", "internalPrompt": null, "tools": [ "create dataset", "sys.find", "ingest", "retrieve" ], "instructions": "Create a new Knowledge Base Dataset with ID ${id}\nThen, ingest ${filepath} into the dataset.\nThen, figure out ${query} from the previously ingested files.", "id": "testknowledge.gpt:1", "toolMapping": { "create dataset": "testknowledge.gpt:10", "ingest": "testknowledge.gpt:17", "retrieve": "testknowledge.gpt:25", "sys.find": "sys.find" }, "localTools": { "": "testknowledge.gpt:1", "create dataset": "testknowledge.gpt:10", "ingest": "testknowledge.gpt:17", "retrieve": "testknowledge.gpt:25" }, "source": { "location": "testknowledge.gpt", "lineNo": 1 }, "workingDir": "." }, "testknowledge.gpt:10": { "name": "create dataset", "description": "Create a new Dataset in the Knowledge Base", "modelName": "gpt-4-turbo-preview", "internalPrompt": null, "arguments": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" }, "instructions": "#!knowledge client create-dataset ${id}", "id": "testknowledge.gpt:10", "localTools": { "": "testknowledge.gpt:1", "create dataset": "testknowledge.gpt:10", "ingest": "testknowledge.gpt:17", "retrieve": "testknowledge.gpt:25" }, "source": { "location": "testknowledge.gpt", "lineNo": 10 }, "workingDir": "." }, "testknowledge.gpt:17": { "name": "ingest", "description": "Ingest a file or all files from a directory into a Knowledge Base Dataset", "modelName": "gpt-4-turbo-preview", "internalPrompt": null, "arguments": { "properties": { "filepath": { "description": "Path to the file or directory to be ingested", "type": "string" }, "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" }, "instructions": "#!knowledge client ingest ${id} ${filepath}", "id": "testknowledge.gpt:17", "localTools": { "": "testknowledge.gpt:1", "create dataset": "testknowledge.gpt:10", "ingest": "testknowledge.gpt:17", "retrieve": "testknowledge.gpt:25" }, "source": { "location": "testknowledge.gpt", "lineNo": 17 }, "workingDir": "." }, "testknowledge.gpt:25": { "name": "retrieve", "description": "Retrieve information from a Knowledge Base Dataset", "modelName": "gpt-4-turbo-preview", "internalPrompt": null, "arguments": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" }, "query": { "description": "Query to be executed against the Knowledge Base Dataset", "type": "string" } }, "type": "object" }, "instructions": "#!knowledge client retrieve ${id} ${query}", "id": "testknowledge.gpt:25", "localTools": { "": "testknowledge.gpt:1", "create dataset": "testknowledge.gpt:10", "ingest": "testknowledge.gpt:17", "retrieve": "testknowledge.gpt:25" }, "source": { "location": "testknowledge.gpt", "lineNo": 25 }, "workingDir": "." } } }, "runID": "1", "time": "2024-04-30T11:18:10-07:00" } { "id": "1", "input": "--id 55558 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html --query List issues relating to acorn login", "level": "info", "logger": "/pkg/monitor", "msg": "started [main]", "parentID": "", "time": "2024-04-30T11:18:10-07:00", "toolID": "testknowledge.gpt:1" } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "sent [main]", "parentID": "", "time": "2024-04-30T11:18:11-07:00", "toolID": "testknowledge.gpt:1" } { "completionID": "1", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "request": { "model": "gpt-4-turbo-preview", "messages": [ { "role": "system", "content": "\nYou are task oriented system.\nYou receive input from a user, process the input from the given instructions, and then output the result.\nYour objective is to provide consistent and correct results.\nYou do not need to explain the steps taken, only provide the result to the given instructions.\nYou are referred to as a tool.\nYou don't move to the next step until you have a result.\n\nCreate a new Knowledge Base Dataset with ID ${id}\nThen, ingest ${filepath} into the dataset.\nThen, figure out ${query} from the previously ingested files." }, { "role": "user", "content": "--id 55558 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html --query List issues relating to acorn login" } ], "temperature": 0, "tools": [ { "type": "function", "function": { "name": "createDataset", "description": "Create a new Dataset in the Knowledge Base", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "find", "description": "Traverse a directory looking for files that match a pattern in the style of the unix find command", "parameters": { "properties": { "directory": { "description": "The directory to search in. The current directory \".\" will be used as the default if no argument is passed", "type": "string" }, "pattern": { "description": "The file pattern to look for. The pattern is a traditional unix glob format with matching any character and ? matching a single character", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "ingest", "description": "Ingest a file or all files from a directory into a Knowledge Base Dataset", "parameters": { "properties": { "filepath": { "description": "Path to the file or directory to be ingested", "type": "string" }, "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "retrieve", "description": "Retrieve information from a Knowledge Base Dataset", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" }, "query": { "description": "Query to be executed against the Knowledge Base Dataset", "type": "string" } }, "type": "object" } } } ] }, "time": "2024-04-30T11:18:11-07:00", "toolID": "testknowledge.gpt:1" } content [1] content | Waiting for model response... content [1] content | tool call createDataset -> {"id":"55558"} { "cached": false, "completionID": "1", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "response": { "role": "assistant", "content": [ { "toolCall": { "index": 0, "id": "call_rCqUwJr8VQ2MoSoi4GfTScot", "function": { "name": "createDataset", "arguments": "{\"id\":\"55558\"}" } } } ] }, "time": "2024-04-30T11:18:12-07:00", "toolID": "testknowledge.gpt:1" } { "id": "call_rCqUwJr8VQ2MoSoi4GfTScot", "input": "{\"id\":\"55558\"}", "level": "info", "logger": "/pkg/monitor", "msg": "started [create dataset(2)]", "parentID": "1", "time": "2024-04-30T11:18:12-07:00", "toolID": "testknowledge.gpt:10" } { "level": "debug", "logger": "/pkg/env", "msg": "Looking for knowledge in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin", "time": "2024-04-30T11:18:12-07:00" } { "level": "debug", "logger": "/pkg/env", "msg": "Found /usr/local/bin/knowledge for knowledge in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin", "time": "2024-04-30T11:18:12-07:00" } { "id": "call_rCqUwJr8VQ2MoSoi4GfTScot", "level": "info", "logger": "/pkg/monitor", "msg": "sent [create dataset(2)]", "parentID": "1", "time": "2024-04-30T11:18:12-07:00", "toolID": "testknowledge.gpt:10" } { "completionID": "1", "id": "call_rCqUwJr8VQ2MoSoi4GfTScot", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "1", "request": { "command": [ "/usr/local/bin/knowledge", "client", "create-dataset", "55558" ], "input": "{\"id\":\"55558\"}" }, "time": "2024-04-30T11:18:12-07:00", "toolID": "testknowledge.gpt:10" } { "cached": false, "completionID": "1", "id": "call_rCqUwJr8VQ2MoSoi4GfTScot", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "1", "response": { "err": null, "output": "Created dataset \"55558\"\n" }, "time": "2024-04-30T11:18:12-07:00", "toolID": "testknowledge.gpt:10" } { "id": "call_rCqUwJr8VQ2MoSoi4GfTScot", "level": "info", "logger": "/pkg/monitor", "msg": "ended [create dataset(2)]", "output": "Created dataset \"55558\"\n", "parentID": "1", "time": "2024-04-30T11:18:12-07:00", "toolID": "testknowledge.gpt:10" } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "continue [main]", "parentID": "", "time": "2024-04-30T11:18:12-07:00", "toolID": "testknowledge.gpt:1", "toolResults": 1 } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "sent [main]", "parentID": "", "time": "2024-04-30T11:18:12-07:00", "toolID": "testknowledge.gpt:1" } { "completionID": "2", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "request": { "model": "gpt-4-turbo-preview", "messages": [ { "role": "system", "content": "\nYou are task oriented system.\nYou receive input from a user, process the input from the given instructions, and then output the result.\nYour objective is to provide consistent and correct results.\nYou do not need to explain the steps taken, only provide the result to the given instructions.\nYou are referred to as a tool.\nYou don't move to the next step until you have a result.\n\nCreate a new Knowledge Base Dataset with ID ${id}\nThen, ingest ${filepath} into the dataset.\nThen, figure out ${query} from the previously ingested files." }, { "role": "user", "content": "--id 55558 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html --query List issues relating to acorn login" }, { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_rCqUwJr8VQ2MoSoi4GfTScot", "type": "function", "function": { "name": "createDataset", "arguments": "{\"id\":\"55558\"}" } } ] }, { "role": "tool", "content": "Created dataset \"55558\"\n", "name": "createDataset", "tool_call_id": "call_rCqUwJr8VQ2MoSoi4GfTScot" } ], "temperature": 0, "tools": [ { "type": "function", "function": { "name": "createDataset", "description": "Create a new Dataset in the Knowledge Base", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "find", "description": "Traverse a directory looking for files that match a pattern in the style of the unix find command", "parameters": { "properties": { "directory": { "description": "The directory to search in. The current directory \".\" will be used as the default if no argument is passed", "type": "string" }, "pattern": { "description": "The file pattern to look for. The pattern is a traditional unix glob format with matching any character and ? matching a single character", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "ingest", "description": "Ingest a file or all files from a directory into a Knowledge Base Dataset", "parameters": { "properties": { "filepath": { "description": "Path to the file or directory to be ingested", "type": "string" }, "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "retrieve", "description": "Retrieve information from a Knowledge Base Dataset", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" }, "query": { "description": "Query to be executed against the Knowledge Base Dataset", "type": "string" } }, "type": "object" } } } ] }, "time": "2024-04-30T11:18:12-07:00", "toolID": "testknowledge.gpt:1" } content [1] content | Waiting for model response... content [1] content | tool call ingest -> {"filepath":"/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html","id":"55558"} { "cached": false, "completionID": "2", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "response": { "role": "assistant", "content": [ { "toolCall": { "index": 0, "id": "call_4zIGhoQoGy03nLiaF3Z1mnjy", "function": { "name": "ingest", "arguments": "{\"filepath\":\"/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html\",\"id\":\"55558\"}" } } } ] }, "time": "2024-04-30T11:18:15-07:00", "toolID": "testknowledge.gpt:1" } { "id": "call_4zIGhoQoGy03nLiaF3Z1mnjy", "input": "{\"filepath\":\"/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html\",\"id\":\"55558\"}", "level": "info", "logger": "/pkg/monitor", "msg": "started [ingest(3)]", "parentID": "1", "time": "2024-04-30T11:18:15-07:00", "toolID": "testknowledge.gpt:17" } { "level": "debug", "logger": "/pkg/env", "msg": "Looking for knowledge in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin", "time": "2024-04-30T11:18:15-07:00" } { "level": "debug", "logger": "/pkg/env", "msg": "Found /usr/local/bin/knowledge for knowledge in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin", "time": "2024-04-30T11:18:15-07:00" } { "id": "call_4zIGhoQoGy03nLiaF3Z1mnjy", "level": "info", "logger": "/pkg/monitor", "msg": "sent [ingest(3)]", "parentID": "1", "time": "2024-04-30T11:18:15-07:00", "toolID": "testknowledge.gpt:17" } { "completionID": "2", "id": "call_4zIGhoQoGy03nLiaF3Z1mnjy", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "1", "request": { "command": [ "/usr/local/bin/knowledge", "client", "ingest", "55558", "/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html" ], "input": "{\"filepath\":\"/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html\",\"id\":\"55558\"}" }, "time": "2024-04-30T11:18:15-07:00", "toolID": "testknowledge.gpt:17" } { "cached": false, "completionID": "2", "id": "call_4zIGhoQoGy03nLiaF3Z1mnjy", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "1", "response": { "err": null, "output": "Ingested \"/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html\" into dataset \"55558\"\n" }, "time": "2024-04-30T11:18:36-07:00", "toolID": "testknowledge.gpt:17" } { "id": "call_4zIGhoQoGy03nLiaF3Z1mnjy", "level": "info", "logger": "/pkg/monitor", "msg": "ended [ingest(3)]", "output": "Ingested \"/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html\" into dataset \"55558\"\n", "parentID": "1", "time": "2024-04-30T11:18:36-07:00", "toolID": "testknowledge.gpt:17" } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "continue [main]", "parentID": "", "time": "2024-04-30T11:18:36-07:00", "toolID": "testknowledge.gpt:1", "toolResults": 1 } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "sent [main]", "parentID": "", "time": "2024-04-30T11:18:36-07:00", "toolID": "testknowledge.gpt:1" } { "completionID": "3", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "request": { "model": "gpt-4-turbo-preview", "messages": [ { "role": "system", "content": "\nYou are task oriented system.\nYou receive input from a user, process the input from the given instructions, and then output the result.\nYour objective is to provide consistent and correct results.\nYou do not need to explain the steps taken, only provide the result to the given instructions.\nYou are referred to as a tool.\nYou don't move to the next step until you have a result.\n\nCreate a new Knowledge Base Dataset with ID ${id}\nThen, ingest ${filepath} into the dataset.\nThen, figure out ${query} from the previously ingested files." }, { "role": "user", "content": "--id 55558 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html --query List issues relating to acorn login" }, { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_rCqUwJr8VQ2MoSoi4GfTScot", "type": "function", "function": { "name": "createDataset", "arguments": "{\"id\":\"55558\"}" } } ] }, { "role": "tool", "content": "Created dataset \"55558\"\n", "name": "createDataset", "tool_call_id": "call_rCqUwJr8VQ2MoSoi4GfTScot" }, { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_4zIGhoQoGy03nLiaF3Z1mnjy", "type": "function", "function": { "name": "ingest", "arguments": "{\"filepath\":\"/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html\",\"id\":\"55558\"}" } } ] }, { "role": "tool", "content": "Ingested \"/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html\" into dataset \"55558\"\n", "name": "ingest", "tool_call_id": "call_4zIGhoQoGy03nLiaF3Z1mnjy" } ], "temperature": 0, "tools": [ { "type": "function", "function": { "name": "createDataset", "description": "Create a new Dataset in the Knowledge Base", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "find", "description": "Traverse a directory looking for files that match a pattern in the style of the unix find command", "parameters": { "properties": { "directory": { "description": "The directory to search in. The current directory \".\" will be used as the default if no argument is passed", "type": "string" }, "pattern": { "description": "The file pattern to look for. The pattern is a traditional unix glob format with matching any character and ? matching a single character", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "ingest", "description": "Ingest a file or all files from a directory into a Knowledge Base Dataset", "parameters": { "properties": { "filepath": { "description": "Path to the file or directory to be ingested", "type": "string" }, "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "retrieve", "description": "Retrieve information from a Knowledge Base Dataset", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" }, "query": { "description": "Query to be executed against the Knowledge Base Dataset", "type": "string" } }, "type": "object" } } } ] }, "time": "2024-04-30T11:18:36-07:00", "toolID": "testknowledge.gpt:1" } content [1] content | Waiting for model response... content [1] content | tool call retrieve -> {"id":"55558","query":"List issues relating to acorn login"} { "cached": false, "completionID": "3", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "response": { "role": "assistant", "content": [ { "toolCall": { "index": 0, "id": "call_iLNdDXXjvdrqhffsaW0LOrIm", "function": { "name": "retrieve", "arguments": "{\"id\":\"55558\",\"query\":\"List issues relating to acorn login\"}" } } } ] }, "time": "2024-04-30T11:18:37-07:00", "toolID": "testknowledge.gpt:1" } { "id": "call_iLNdDXXjvdrqhffsaW0LOrIm", "input": "{\"id\":\"55558\",\"query\":\"List issues relating to acorn login\"}", "level": "info", "logger": "/pkg/monitor", "msg": "started [retrieve(4)]", "parentID": "1", "time": "2024-04-30T11:18:37-07:00", "toolID": "testknowledge.gpt:25" } { "level": "debug", "logger": "/pkg/env", "msg": "Looking for knowledge in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin", "time": "2024-04-30T11:18:37-07:00" } { "level": "debug", "logger": "/pkg/env", "msg": "Found /usr/local/bin/knowledge for knowledge in /Users/sangeethahariharan/.rd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/sangeethahariharan/.cargo/bin", "time": "2024-04-30T11:18:37-07:00" } { "id": "call_iLNdDXXjvdrqhffsaW0LOrIm", "level": "info", "logger": "/pkg/monitor", "msg": "sent [retrieve(4)]", "parentID": "1", "time": "2024-04-30T11:18:37-07:00", "toolID": "testknowledge.gpt:25" } { "completionID": "3", "id": "call_iLNdDXXjvdrqhffsaW0LOrIm", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "1", "request": { "command": [ "/usr/local/bin/knowledge", "client", "retrieve", "55558", "List issues relating to acorn login" ], "input": "{\"id\":\"55558\",\"query\":\"List issues relating to acorn login\"}" }, "time": "2024-04-30T11:18:37-07:00", "toolID": "testknowledge.gpt:25" } { "cached": false, "completionID": "3", "id": "call_iLNdDXXjvdrqhffsaW0LOrIm", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "1", "response": { "err": null, "output": "Retrieved the following 5 sources for the query \"List issues relating to acorn login\" from dataset \"55558\": [{\"content\":\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1zb3J0LWl0ZW0gd2lkdGgtYXV0byBtLTAgcHgtMyBweS0yIiBhcmlhLWNoZWNrZWQ9ImZhbHNlIiByb2xlPSJtZW51aXRlbXJhZGlvIiBocmVmPSIvYWNvcm4taW8vcnVudGltZS9pc3N1ZXM/cT1pcyUzQWlzc3VlK2lzJTNBb3Blbitzb3J0JTNBcmVhY3Rpb25zLXJvY2tldC1kZXNjIj4KICAgICAgICAgICAgICA8Zy1lbW9qaSBhbGlhcz0icm9ja2V0IiBmYWxsYmFjay1zcmM9Imh0dHBzOi8vZ2l0aHViLmdpdGh1YmFzc2V0cy5jb20vYXNzZXRzLzFmNjgwLWQwZWY0N2ZkYjUxNS5wbmciIGNsYXNzPSJlbW9qaSBtLTAgdi1hbGlnbi1iYXNlbGluZSI+8J+agDwvZy\",\"metadata\":{\"filename\":\"bugs.html\"},\"similarity_score\":0.7411942},{\"content\":\"AgICBkYXRhLXN1cHBvcnRlZC1zY29wZS10eXBlcz0iWyZxdW90O293bmVyJnF1b3Q7LCZxdW90O3JlcG9zaXRvcnkmcXVvdDssJnF1b3Q7JnF1b3Q7XSIKICAgICAgICAgIAogICAgICAgICAgZGF0YS10YXJnZXRzPSJjb21tYW5kLXBhbGV0dGUuc2VydmVyRGVmaW5lZFByb3ZpZGVyRWxlbWVudHMiCiAgICAgICAgICA+PC9zZXJ2ZXItZGVmaW5lZC1wcm92aWRlcj4KICAgICAgICA8c2VydmVyLWRlZmluZWQtcHJvdmlkZXIKICAgICAgICAgIGRhdGEtdHlwZT0icmVtb3RlIgogICAgICAgICAgZGF0YS1mZXRjaC1kZWJvdW5jZT0iMjAwIgogICAgICAgICAgICBkYXRhLXNyYz0iL2NvbW1hbmRfcGFsZXR0ZS9qdW1wX3RvIgogICAgICAgICAgZGF0YS1zdXBwb3J0ZWQtbW9kZXM9IlsmcXVvdDtAJnF1b3Q7LCZxdW90O0AmcXVvdDtdIgogICAgICAgICAgICBkYXRhLXN1cHBvcnRlZC1zY29wZS10eXBlcz0iWyZxdW90OyZxdW90OywmcXVvdDtvd25lciZxdW90O10iCiAgICAgICAgICAKICAgICAgICAgIGRhdGEtdGFyZ2V0cz0iY29tbWFuZC1wYWxldHRlLnNlcnZlckRlZmluZWRQcm92\",\"metadata\":{\"filename\":\"bugs.html\"},\"similarity_score\":0.7398464},{\"content\":\"AgICAgIDxzcGFuIGRhdGEtdmlldy1jb21wb25lbnQ9InRydWUiIGNsYXNzPSJBY3Rpb25MaXN0SXRlbS1sYWJlbCI+CiAgICAgICAgICBEaXNjdXNzaW9ucwo8L3NwYW4+PC9hPgogIAogIAo8L2xpPgogICAgICA8bGkgaGlkZGVuPSJoaWRkZW4iIGRhdGEtbWVudS1pdGVtPSJpNGFjdGlvbnMtdGFiIiBkYXRhLXRhcmdldHM9ImFjdGlvbi1saXN0Lml0ZW1zIGFjdGlvbi1saXN0Lml0ZW1zIiByb2xlPSJub25lIiBkYXRhLXZpZXctY29tcG9uZW50PSJ0cnVlIiBjbGFzcz0iQWN0aW9uTGlzdEl0ZW0iPgogICAgCiAgICA8YSB0YWJpbmRleD0iLTEiIGlkPSJpdGVtLTI1MjJiN2E1LTY1YjYtNDdjZC05YTAyLTRiMDgyZTg4MzdhOSIgaHJlZj0iL2Fjb3JuLWlvL3J1bnRpbWUvYWN0aW9ucyIgcm9sZT0ibWVudWl0ZW0iIGRhdGEtdmlldy1jb21wb25lbnQ9InRydWUiIGNsYXNzPSJBY3Rpb25MaXN0Q29udGVudCBBY3Rpb25MaXN0Q29udGVudC0tdmlzdWFsMTYiPgogICAgICAgIDxzcGFuIGNsYXNzPSJBY3Rpb25MaXN0SXRlbS12aXN1YWwgQWN0aW9uTGlzdEl0ZW0tdmlzdWFsLS1sZWFka\",\"metadata\":{\"filename\":\"bugs.html\"},\"similarity_score\":0.73957044},{\"content\":\"AgICAgICAgICAgICBkYXRhLWdyb3VwLWhpbnQ9IlR5cGUgIyB0byBmaWx0ZXIiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1saW1pdHM9Int9IgogICAgICAgICAgICAgIGRhdGEtZGVmYXVsdC1wcmlvcml0eT0iMTAiCiAgICAgICAgICAgID4KICAgICAgICAgICAgPC9jb21tYW5kLXBhbGV0dGUtaXRlbS1ncm91cD4KICAgICAgICAgICAgPGNvbW1hbmQtcGFsZXR0ZS1pdGVtLWdyb3VwCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1pZD0idGVhbXMiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC10aXRsZT0iVGVhbXMiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1oaW50PSIiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1saW1pdHM9Int9IgogICAgICAgICAgICAgIGRhdGEtZGVmYXVsdC1wcmlvcml0eT0iMTEiCiAgICAgICAgICAgID4KICAgICAgICAgICAgPC9jb21tYW5kLXBhbGV0dGUtaXRlbS1ncm91cD4KICAgICAgICAgICAgPGNvbW1hbmQtcGFsZXR0ZS1pdGVtLWdyb3VwCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1pZD0idXNlcnMiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC10aXRsZT0iVXNlcnMiCiAgICAgICAgICAgICAgZGF0YS1ncm91c\",\"metadata\":{\"filename\":\"bugs.html\"},\"similarity_score\":0.73683745}]\n" }, "time": "2024-04-30T11:18:37-07:00", "toolID": "testknowledge.gpt:25" } { "id": "call_iLNdDXXjvdrqhffsaW0LOrIm", "level": "info", "logger": "/pkg/monitor", "msg": "ended [retrieve(4)]", "output": "Retrieved the following 5 sources for the query \"List issues relating to acorn login\" from dataset \"55558\": [{\"content\":\"AgICAgICAgIAo8bGkgZGF0YS10YXJnZXRzPSJuYXYtbGlzdC5pdGVtcyBuYXYtbGlzdC5pdGVtcyIgZGF0YS1pdGVtLWlkPSIiIGRhdGEtdmlldy1jb21wb25lbnQ9InRydWUiIGNsYXNzPSJBY3Rpb25MaXN0SXRlbSI+CiAgICAKICAgIDxhIGRhdGEtYW5hbHl0aWNzLWV2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ldC1kZXNjIj4KICAgICAgICAgICAgICA8Zy1lbW9qaSBhbGlhcz0icm9ja2V0IiBmYWxsYmFjay1zcmM9Imh0dHBzOi8vZ2l0aHViLmdpdGh1YmFzc2V0cy5jb20vYXNzZXRzLzFmNjgwLWQwZWY0N2ZkYjUxNS5wbmciIGNsYXNzPSJlbW9qaSBtLTAgdi1hbGlnbi1iYXNlbGluZSI+8J+agDwvZy\",\"metadata\":{\"filename\":\"bugs.html\"},\"similarity_score\":0.7411942},{\"content\":\"AgICBkYXRhLXN1cHBvcnRlZC1zY29wZS10eXBlcz0iWyZxdW90O293bmVyJnF1b3Q7LCZxdW90O3JlcG9zaXRvcnkmcXVvdDssJnF1b3Q7JnF1b3Q7XSIKICAgICAgICAgIAogICAgICAgICAgZGF0YS10YXJnZXRzPSJjb21tYW5kLXBhbGV0dGUuc2VydmVyRGVmaW5lZFByb3ZpZGVyRWxlbWVudHMiCiAgICAgICAgICA+PC9zZXJ2ZXItZGVmaW5lZC1wcm92aWRlcj4KICAgICAgICA8c2VydmVyLWRlZmluZWQtcHJvdmlkZXIKICAgICAgICAgIGRhdGEtdHlwZT0icmVtb3RlIgogICAgICAgICAgZGF0YS1mZXRjaC1kZWJvdW5jZT0iMjAwIgogICAgICAgICAgICBkYXRhLXNyYz0iL2NvbW1hbmRfcGFsZXR0ZS9qdW1wX3RvIgogICAgICAgICAgZGF0YS1zdXBwb3J0ZWQtbW9kZXM9IlsmcXVvdDtAJnF1b3Q7LCZxdW90O0AmcXVvdDtdIgogICAgICAgICAgICBkYXRhLXN1cHBvcnRlZC1zY29wZS10eXBlcz0iWyZxdW90OyZxdW90OywmcXVvdDtvd25lciZxdW90O10iCiAgICAgICAgICAKICAgICAgICAgIGRhdGEtdGFyZ2V0cz0iY29tbWFuZC1wYWxldHRlLnNlcnZlckRlZmluZWRQcm92\",\"metadata\":{\"filename\":\"bugs.html\"},\"similarity_score\":0.7398464},{\"content\":\"AgICAgIDxzcGFuIGRhdGEtdmlldy1jb21wb25lbnQ9InRydWUiIGNsYXNzPSJBY3Rpb25MaXN0SXRlbS1sYWJlbCI+CiAgICAgICAgICBEaXNjdXNzaW9ucwo8L3NwYW4+PC9hPgogIAogIAo8L2xpPgogICAgICA8bGkgaGlkZGVuPSJoaWRkZW4iIGRhdGEtbWVudS1pdGVtPSJpNGFjdGlvbnMtdGFiIiBkYXRhLXRhcmdldHM9ImFjdGlvbi1saXN0Lml0ZW1zIGFjdGlvbi1saXN0Lml0ZW1zIiByb2xlPSJub25lIiBkYXRhLXZpZXctY29tcG9uZW50PSJ0cnVlIiBjbGFzcz0iQWN0aW9uTGlzdEl0ZW0iPgogICAgCiAgICA8YSB0YWJpbmRleD0iLTEiIGlkPSJpdGVtLTI1MjJiN2E1LTY1YjYtNDdjZC05YTAyLTRiMDgyZTg4MzdhOSIgaHJlZj0iL2Fjb3JuLWlvL3J1bnRpbWUvYWN0aW9ucyIgcm9sZT0ibWVudWl0ZW0iIGRhdGEtdmlldy1jb21wb25lbnQ9InRydWUiIGNsYXNzPSJBY3Rpb25MaXN0Q29udGVudCBBY3Rpb25MaXN0Q29udGVudC0tdmlzdWFsMTYiPgogICAgICAgIDxzcGFuIGNsYXNzPSJBY3Rpb25MaXN0SXRlbS12aXN1YWwgQWN0aW9uTGlzdEl0ZW0tdmlzdWFsLS1sZWFka\",\"metadata\":{\"filename\":\"bugs.html\"},\"similarity_score\":0.73957044},{\"content\":\"AgICAgICAgICAgICBkYXRhLWdyb3VwLWhpbnQ9IlR5cGUgIyB0byBmaWx0ZXIiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1saW1pdHM9Int9IgogICAgICAgICAgICAgIGRhdGEtZGVmYXVsdC1wcmlvcml0eT0iMTAiCiAgICAgICAgICAgID4KICAgICAgICAgICAgPC9jb21tYW5kLXBhbGV0dGUtaXRlbS1ncm91cD4KICAgICAgICAgICAgPGNvbW1hbmQtcGFsZXR0ZS1pdGVtLWdyb3VwCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1pZD0idGVhbXMiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC10aXRsZT0iVGVhbXMiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1oaW50PSIiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1saW1pdHM9Int9IgogICAgICAgICAgICAgIGRhdGEtZGVmYXVsdC1wcmlvcml0eT0iMTEiCiAgICAgICAgICAgID4KICAgICAgICAgICAgPC9jb21tYW5kLXBhbGV0dGUtaXRlbS1ncm91cD4KICAgICAgICAgICAgPGNvbW1hbmQtcGFsZXR0ZS1pdGVtLWdyb3VwCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1pZD0idXNlcnMiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC10aXRsZT0iVXNlcnMiCiAgICAgICAgICAgICAgZGF0YS1ncm91c\",\"metadata\":{\"filename\":\"bugs.html\"},\"similarity_score\":0.73683745}]\n", "parentID": "1", "time": "2024-04-30T11:18:37-07:00", "toolID": "testknowledge.gpt:25" } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "continue [main]", "parentID": "", "time": "2024-04-30T11:18:37-07:00", "toolID": "testknowledge.gpt:1", "toolResults": 1 } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "sent [main]", "parentID": "", "time": "2024-04-30T11:18:38-07:00", "toolID": "testknowledge.gpt:1" } { "completionID": "4", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "request": { "model": "gpt-4-turbo-preview", "messages": [ { "role": "system", "content": "\nYou are task oriented system.\nYou receive input from a user, process the input from the given instructions, and then output the result.\nYour objective is to provide consistent and correct results.\nYou do not need to explain the steps taken, only provide the result to the given instructions.\nYou are referred to as a tool.\nYou don't move to the next step until you have a result.\n\nCreate a new Knowledge Base Dataset with ID ${id}\nThen, ingest ${filepath} into the dataset.\nThen, figure out ${query} from the previously ingested files." }, { "role": "user", "content": "--id 55558 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html --query List issues relating to acorn login" }, { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_rCqUwJr8VQ2MoSoi4GfTScot", "type": "function", "function": { "name": "createDataset", "arguments": "{\"id\":\"55558\"}" } } ] }, { "role": "tool", "content": "Created dataset \"55558\"\n", "name": "createDataset", "tool_call_id": "call_rCqUwJr8VQ2MoSoi4GfTScot" }, { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_4zIGhoQoGy03nLiaF3Z1mnjy", "type": "function", "function": { "name": "ingest", "arguments": "{\"filepath\":\"/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html\",\"id\":\"55558\"}" } } ] }, { "role": "tool", "content": "Ingested \"/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html\" into dataset \"55558\"\n", "name": "ingest", "tool_call_id": "call_4zIGhoQoGy03nLiaF3Z1mnjy" }, { "role": "assistant", "content": "", "tool_calls": [ { "id": "call_iLNdDXXjvdrqhffsaW0LOrIm", "type": "function", "function": { "name": "retrieve", "arguments": "{\"id\":\"55558\",\"query\":\"List issues relating to acorn login\"}" } } ] }, { "role": "tool", "content": "Retrieved the following 5 sources for the query \"List issues relating to acorn login\" from dataset \"55558\": [{\"content\":\"AgICAgICAgIAo8bGkgZGF0YS10YXJnZXRzPSJuYXYtbGlzdC5pdGVtcyBuYXYtbGlzdC5pdGVtcyIgZGF0YS1pdGVtLWlkPSIiIGRhdGEtdmlldy1jb21wb25lbnQ9InRydWUiIGNsYXNzPSJBY3Rpb25MaXN0SXRlbSI+CiAgICAKICAgIDxhIGRhdGEtYW5hbHl0aWNzLWV2ZW50PSJ7JnF1b3Q7Y2F0ZWdvcnkmcXVvdDs6JnF1b3Q7R2xvYmFsIG5hdmlnYXRpb24mcXVvdDssJnF1b3Q7YWN0aW9uJnF1b3Q7OiZxdW90O0NPREVTUEFDRVMmcXVvdDssJnF1b3Q7bGFiZWwmcXVvdDs6bnVsbH0iIGlkPSJpdGVtLTNmYWE2ZTg0LTZiYmItNDI2Zi05MzRiLWQzZjczZ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adata\":{\"filename\":\"bugs.html\"},\"similarity_score\":0.7411942},{\"content\":\"AgICBkYXRhLXN1cHBvcnRlZC1zY29wZS10eXBlcz0iWyZxdW90O293bmVyJnF1b3Q7LCZxdW90O3JlcG9zaXRvcnkmcXVvdDssJnF1b3Q7JnF1b3Q7XSIKICAgICAgICAgIAogICAgICAgICAgZGF0YS10YXJnZXRzPSJjb21tYW5kLXBhbGV0dGUuc2VydmVyRGVmaW5lZFByb3ZpZGVyRWxlbWVudHMiCiAgICAgICAgICA+PC9zZXJ2ZXItZGVmaW5lZC1wcm92aWRlcj4KICAgICAgICA8c2VydmVyLWRlZmluZWQtcHJvdmlkZXIKICAgICAgICAgIGRhdGEtdHlwZT0icmVtb3RlIgogICAgICAgICAgZGF0YS1mZXRjaC1kZWJvdW5jZT0iMjAwIgogICAgICAgICAgICBkYXRhLXNyYz0iL2NvbW1hbmRfcGFsZXR0ZS9qdW1wX3RvIgogICAgICAgICAgZGF0YS1zdXBwb3J0ZWQtbW9kZXM9IlsmcXVvdDtAJnF1b3Q7LCZxdW90O0AmcXVvdDtdIgogICAgICAgICAgICBkYXRhLXN1cHBvcnRlZC1zY29wZS10eXBlcz0iWyZxdW90OyZxdW90OywmcXVvdDtvd25lciZxdW90O10iCiAgICAgICAgICAKICAgICAgICAgIGRhdGEtdGFyZ2V0cz0iY29tbWFuZC1wYWxldHRlLnNlcnZlckRlZmluZWRQcm92\",\"metadata\":{\"filename\":\"bugs.html\"},\"similarity_score\":0.7398464},{\"content\":\"AgICAgIDxzcGFuIGRhdGEtdmlldy1jb21wb25lbnQ9InRydWUiIGNsYXNzPSJBY3Rpb25MaXN0SXRlbS1sYWJlbCI+CiAgICAgICAgICBEaXNjdXNzaW9ucwo8L3NwYW4+PC9hPgogIAogIAo8L2xpPgogICAgICA8bGkgaGlkZGVuPSJoaWRkZW4iIGRhdGEtbWVudS1pdGVtPSJpNGFjdGlvbnMtdGFiIiBkYXRhLXRhcmdldHM9ImFjdGlvbi1saXN0Lml0ZW1zIGFjdGlvbi1saXN0Lml0ZW1zIiByb2xlPSJub25lIiBkYXRhLXZpZXctY29tcG9uZW50PSJ0cnVlIiBjbGFzcz0iQWN0aW9uTGlzdEl0ZW0iPgogICAgCiAgICA8YSB0YWJpbmRleD0iLTEiIGlkPSJpdGVtLTI1MjJiN2E1LTY1YjYtNDdjZC05YTAyLTRiMDgyZTg4MzdhOSIgaHJlZj0iL2Fjb3JuLWlvL3J1bnRpbWUvYWN0aW9ucyIgcm9sZT0ibWVudWl0ZW0iIGRhdGEtdmlldy1jb21wb25lbnQ9InRydWUiIGNsYXNzPSJBY3Rpb25MaXN0Q29udGVudCBBY3Rpb25MaXN0Q29udGVudC0tdmlzdWFsMTYiPgogICAgICAgIDxzcGFuIGNsYXNzPSJBY3Rpb25MaXN0SXRlbS12aXN1YWwgQWN0aW9uTGlzdEl0ZW0tdmlzdWFsLS1sZWFka\",\"metadata\":{\"filename\":\"bugs.html\"},\"similarity_score\":0.73957044},{\"content\":\"AgICAgICAgICAgICBkYXRhLWdyb3VwLWhpbnQ9IlR5cGUgIyB0byBmaWx0ZXIiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1saW1pdHM9Int9IgogICAgICAgICAgICAgIGRhdGEtZGVmYXVsdC1wcmlvcml0eT0iMTAiCiAgICAgICAgICAgID4KICAgICAgICAgICAgPC9jb21tYW5kLXBhbGV0dGUtaXRlbS1ncm91cD4KICAgICAgICAgICAgPGNvbW1hbmQtcGFsZXR0ZS1pdGVtLWdyb3VwCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1pZD0idGVhbXMiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC10aXRsZT0iVGVhbXMiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1oaW50PSIiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1saW1pdHM9Int9IgogICAgICAgICAgICAgIGRhdGEtZGVmYXVsdC1wcmlvcml0eT0iMTEiCiAgICAgICAgICAgID4KICAgICAgICAgICAgPC9jb21tYW5kLXBhbGV0dGUtaXRlbS1ncm91cD4KICAgICAgICAgICAgPGNvbW1hbmQtcGFsZXR0ZS1pdGVtLWdyb3VwCiAgICAgICAgICAgICAgZGF0YS1ncm91cC1pZD0idXNlcnMiCiAgICAgICAgICAgICAgZGF0YS1ncm91cC10aXRsZT0iVXNlcnMiCiAgICAgICAgICAgICAgZGF0YS1ncm91c\",\"metadata\":{\"filename\":\"bugs.html\"},\"similarity_score\":0.73683745}]\n", "name": "retrieve", "tool_call_id": "call_iLNdDXXjvdrqhffsaW0LOrIm" } ], "temperature": 0, "tools": [ { "type": "function", "function": { "name": "createDataset", "description": "Create a new Dataset in the Knowledge Base", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "find", "description": "Traverse a directory looking for files that match a pattern in the style of the unix find command", "parameters": { "properties": { "directory": { "description": "The directory to search in. The current directory \".\" will be used as the default if no argument is passed", "type": "string" }, "pattern": { "description": "The file pattern to look for. The pattern is a traditional unix glob format with * matching any character and ? matching a single character", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "ingest", "description": "Ingest a file or all files from a directory into a Knowledge Base Dataset", "parameters": { "properties": { "filepath": { "description": "Path to the file or directory to be ingested", "type": "string" }, "id": { "description": "ID of the Dataset", "type": "string" } }, "type": "object" } } }, { "type": "function", "function": { "name": "retrieve", "description": "Retrieve information from a Knowledge Base Dataset", "parameters": { "properties": { "id": { "description": "ID of the Dataset", "type": "string" }, "query": { "description": "Query to be executed against the Knowledge Base Dataset", "type": "string" } }, "type": "object" } } } ] }, "time": "2024-04-30T11:18:38-07:00", "toolID": "testknowledge.gpt:1" } content [1] content | Waiting for model response... content [1] content | The dataset "55558" contains issues relating to acorn login, but the retrieved content is encoded and does not directly list specific issues in a readable format. { "cached": false, "completionID": "4", "id": "1", "level": "debug", "logger": "/pkg/monitor", "msg": "debug", "parentID": "", "response": { "role": "assistant", "content": [ { "text": "The dataset \"55558\" contains issues relating to acorn login, but the retrieved content is encoded and does not directly list specific issues in a readable format." } ] }, "time": "2024-04-30T11:18:39-07:00", "toolID": "testknowledge.gpt:1" } { "id": "1", "level": "info", "logger": "/pkg/monitor", "msg": "ended [main]", "output": "The dataset \"55558\" contains issues relating to acorn login, but the retrieved content is encoded and does not directly list specific issues in a readable format.", "parentID": "", "time": "2024-04-30T11:18:39-07:00", "toolID": "testknowledge.gpt:1" } { "err": null, "level": "debug", "logger": "/pkg/monitor", "msg": "Run stopped", "output": "The dataset \"55558\" contains issues relating to acorn login, but the retrieved content is encoded and does not directly list specific issues in a readable format.", "runID": "1", "time": "2024-04-30T11:18:39-07:00" }

INPUT:

--id 55558 --filepath /Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html --query List issues relating to acorn login

OUTPUT:

The dataset "55558" contains issues relating to acorn login, but the retrieved content is encoded and does not directly list specific issues in a readable format.


**knowledge logs** indicate success for ingestion and retrieval:

2024/04/30 11:18:15 INFO Ingesting content into dataset dataset=55558 2024/04/30 11:18:15 DEBUG Received ingest request content_size=676096 metadata="&{Name:bugs.html AbsolutePath:/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html Size:380303 ModifiedAt:2024-03-07 17:04:28 -0800 PST}" 2024/04/30 11:18:15 INFO IngestOpts opts="{Filename:0x140002fe270 FileMetadata:0x14002b707c0 IsDuplicateFuncName: IsDuplicateFunc:}" 2024/04/30 11:18:15 DEBUG Loading data type=.html filename=bugs.html 2024/04/30 11:18:16 DEBUG Ingesting documents count=861 2024/04/30 11:18:36 INFO Ingested document filename=bugs.html count=861 absolute_path=/Users/sangeethahariharan/Downloads/mytestdocuments/bugs.html [GIN] 2024/04/30 - 11:18:36 | 200 | 20.491284458s | ::1 | POST "/v1/datasets/55558/ingest" 2024/04/30 11:18:37 INFO Retrieving content from dataset dataset=55558 2024/04/30 11:18:37 DEBUG Retrieving content from dataset dataset=55558 query="{Prompt:List issues relating to acorn login TopK:0x14004335f80}" 2024/04/30 11:18:37 DEBUG Retrieved documents num_documents=5 [GIN] 2024/04/30 - 11:18:37 | 200 | 120.189875ms | ::1 | POST "/v1/datasets/55558/retrieve"

sangee2004 commented 6 months ago

Renamed bugs.html to bugs.txt to upload the file - bugs.txt

iwilltry42 commented 6 months ago

Same as https://github.com/gptscript-ai/knowledge/issues/5#issuecomment-2093482625

sangee2004 commented 6 months ago

Able to retrieve information from html files successfully when testing with latest version of knowledge.