Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Has issue loading tiktoken_core unless it modify the code to load the absolute path #16

Closed
atlas-comstock opened this issue Aug 16, 2024 · 5 comments

Comments

@atlas-comstock
Copy link

local ok, core = pcall(require, "tiktoken_core")

local ok, core = pcall(require, "tiktoken_core")

The load is failed, and shown tiktoken_core is not found!!!!

I modified it to

  local dylib_path = "/Users/myname/.vim/plugged/avante.nvim/build/tiktoken_core.dylib"
  local ok, core = pcall(package.loadlib, dylib_path, "luaopen_tiktoken_core")

then it works.

@atlas-comstock
Copy link
Author

atlas-comstock commented Aug 16, 2024

After setup, have this error

   Error  12:15:44 msg_show.lua_error Error executing luv callback:
...guser/.vim/plugged/avante.nvim/lua/avante/tiktoken.lua:69: attempt to index upvalue 'core' (a function value)
stack traceback:
	...guser/.vim/plugged/avante.nvim/lua/avante/tiktoken.lua:69: in function 'done'
	...guser/.vim/plugged/avante.nvim/lua/avante/tiktoken.lua:42: in function <...guser/.vim/plugged/avante.nvim/lua/avante/tiktoken.lua:31>

@atlas-comstock
Copy link
Author

I am using LuaJIT, make luajit to build the tiktoken_core

@aarnphm
Copy link
Collaborator

aarnphm commented Aug 16, 2024

can you pull from the latest change on main? It should already patch cpath with the dylib path

@atlas-comstock
Copy link
Author

@aarnphm same issue using latest master, commit id 78be877a3ec69ada3b3826bc57336a5b4bdc7a05

@kohane27
Copy link

Not OP but I have the same problem:

return {
  "yetone/avante.nvim",
  event = "VeryLazy",
  build = "make",
  dependencies = {
    "nvim-tree/nvim-web-devicons",
    "grapp-dev/nui-components.nvim",
    "MunifTanjim/nui.nvim",
    "nvim-lua/plenary.nvim",
    "MeanderingProgrammer/render-markdown.nvim",
  },
  opts = {
    provider = "claude",
  },
}

Tried on the latest commit (ce5d421) but to no avail. Any help is much appreciated. Thank you!

@yetone yetone closed this as completed in 4897bb4 Aug 16, 2024
yetone added a commit that referenced this issue Aug 17, 2024
* refactor(ui): bounding popover (#13)

* refactor(ui): bounding popover

Signed-off-by: Aaron Pham <[email protected]>

* chore: update readme instructions on setting up render-markdown.nvim

Signed-off-by: Aaron Pham <[email protected]>

* chore: align code style

* fix: incorrect type annotation

* fix: make it work with mouse movement

Signed-off-by: Aaron Pham <[email protected]>

* fix: focus correct on render

Signed-off-by: Aaron Pham <[email protected]>

* fix: make sure to close the view

Signed-off-by: Aaron Pham <[email protected]>

* chore: cleanup cursor position

Signed-off-by: Aaron Pham <[email protected]>

* docs: add notes on rc

Signed-off-by: Aaron Pham <[email protected]>

* fix: make sure to apply if has diff

Signed-off-by: Aaron Pham <[email protected]>

* fix: do not simulate user input

---------

Signed-off-by: Aaron Pham <[email protected]>
Co-authored-by: yetone <[email protected]>

* fix(autocmd): make sure to load tiktoken on correct events (closes #16) (#24)

Signed-off-by: Aaron Pham <[email protected]>

* feat(type): better hinting on nui components (#27)

Signed-off-by: Aaron Pham <[email protected]>

* feat: scrollview and tracking config and lazy load and perf (#33)

* feat: scrollview and tracking config and lazy load and perf

Signed-off-by: Aaron Pham <[email protected]>

* fix: add back options

Signed-off-by: Aaron Pham <[email protected]>

* revert: remove unused autocmd

Signed-off-by: Aaron Pham <[email protected]>

* fix: get code content

* fix: keybinding hint virtual text position

---------

Signed-off-by: Aaron Pham <[email protected]>
Co-authored-by: yetone <[email protected]>

---------

Signed-off-by: Aaron Pham <[email protected]>
Co-authored-by: Aaron Pham <[email protected]>
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

No branches or pull requests

3 participants