Skip to content

Conversation

@StrongMonkey
Copy link
Contributor

@StrongMonkey StrongMonkey commented Aug 20, 2024

This pr adds the following features/changes/improvements:

  1. Add new knowledge ingestion workflow. It ingests file using threadID as datasetID after file is uploaded. It also packages latest knowledge binary releases into the app. It also adds new GPTSCRIPT_THREAD_ID to gptscript run so that it can be used by knowledge tool to know which dataset it needs to query from.
  2. It changes thread to have its unique workspace. For knowledge files, it will be stored in knowledge subdir inside its own workspace.
  3. Changed so that when you go to chat, if there is no thread, it will automatically create a thread with tildy. Once you have threads, it will go to the latest thread you interacted with.
  4. Make so that loading status is moved to message bar/button instead of whole screen.
  5. Chatting with new assistant will by default create a thread.

@StrongMonkey StrongMonkey force-pushed the fix-knowledge-workspace branch 3 times, most recently from a2e7c4a to 947167e Compare August 20, 2024 23:45
@StrongMonkey StrongMonkey marked this pull request as ready for review August 20, 2024 23:45

const execPromise = promisify(exec);

export async function ingest(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where we run knowledge ingest command on server side to ingest file on fly.

Copy link
Member

@njhale njhale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great 👍

I left a few comments, but besides that I'd like to check to make sure the new binaries don't interfere with notarizing before this goes in. I'll circle back with the results shortly.

Edit:

Just checked and it passes code signing and notarization for mac 💯

targetPlatform: mac
  • electron-builder  version=24.13.3 os=23.6.0
  • description is missed in the package.json  appPackageFile=/Users/nick/projects/gptscript-ai/desktop/package.json
  • writing effective config  file=electron-dist/builder-effective-config.yaml
  • packaging       platform=darwin arch=arm64 electron=31.3.1 appOutDir=electron-dist/mac-arm64
  • signing         file=electron-dist/mac-arm64/Acorn.app platform=darwin type=distribution identity=A96259356AEA4477EE16007EBEF6012A993E089E provisioningProfile=none
  • notarization successful
  • building        target=DMG arch=arm64 file=electron-dist/Acorn-0.10.0-rc3-arm64.dmg
  • Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+

Signed-off-by: Daishan Peng <daishan@acorn.io>
Signed-off-by: Daishan Peng <daishan@acorn.io>
@StrongMonkey StrongMonkey force-pushed the fix-knowledge-workspace branch from 947167e to b9974c0 Compare August 21, 2024 05:43
@StrongMonkey StrongMonkey requested a review from njhale August 21, 2024 05:44
await fs.writeFile(path.join(threadPath, STATE_FILE), '');

if (firstMessage) {
const generatedThreadName = await generateThreadName(firstMessage);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand it, it was a requirement to have the LLM name the thread based on the first message. Has that requirement changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I changed it because the thread will always be created at first and it is kind of weird that the name will be changed later after user type the message. But yeah I will confirm with craig.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will change this, thanks for pointting out

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

prompt: true,
confirm: true,
env: [
...Object.entries(process.env).map(([key, value]) => `${key}=${value}`),
Copy link
Contributor

@thedadams thedadams Aug 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary. Adding env vars here should append to the existing environment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It happens elsewhere.

Copy link
Contributor

@iwilltry42 iwilltry42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but since I'm new to the code base, I'd wait for @njhale's and @thedadams' final review :)

Signed-off-by: Daishan Peng <daishan@acorn.io>
@StrongMonkey StrongMonkey merged commit e8fcaa0 into gptscript-ai:main Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants