Code Monkey home page Code Monkey logo

cmp-ai's People

Contributors

catgoose avatar github-actions[bot] avatar mdietrich16 avatar nifoc avatar tzachar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cmp-ai's Issues

Add delay when firing auto-complete

I wish user could define delay e.g. 0.3 sec, where cmp-ai would wait for user to be idle for 0.3 before sending request to server.
I think right now it fires autocomplete on every stroke, right?
I know about [C-x] mapping, but still having delay option would be cool - it would prevent my GPU fans from spining when typing fast, and not waiting for autocomplete.

Support for AWS codewhisperer

Awesome project!

I am searching for an AWS code whisperer plugin and found this project. I guess this would be the best place to insert a new AI tool.

cannot change ollama model

I think something is wrong with arguments passed to ollama:new
image

the o variable seems to hold 'provider_options' (initialized by user - to override build in model) :
image
params is nill.
Thus build-in parameters cannot be overridden in line:
self.params = vim.tbl_deep_extend('keep', params or {}, {

Config:

local cmp_ai = require "cmp_ai.config"

cmp_ai:setup {
  max_lines = 20,
  provider = "Ollama",
  provider_options = {
    model = 'deepseek-coder:1.3b-base-q5_0', -- way stronger version.. but not working..--need custom promps.
    -- prompt="<|fim▁begin|>"..lines_before.."<|fim▁hole|>"..lines_after.."<|fim▁end|>"
    options = {
      temperature = 0.2,
    }
  },      
.......

Btw. is there way to override model promp from within 'provider_options' ?

OpenAI model not working

Hi there, I'm getting the "Completion started" notification in each keystroke, but the suggestion does not show up at all.

All other completion cmp plugins are working fine, even tabnine.

My OPENAI_API_KEY key is set and working.

Please let me know what is missing:

        local cmp_ai = require("cmp_ai.config")
        local ai_compare = require("cmp_ai.compare")

...
        -- Cmp AI config
        cmp_ai:setup({
            max_lines = 1000,
            provider = "OpenAI",
            model = "gpt-4",
            notify = true,
            run_on_every_keystroke = true,
            ignored_file_types = {
                -- default is not to ignore
                -- uncomment to ignore in lua:
                -- lua = true
            },
        })

            sources = cmp.config.sources({
                { name = "cmp_ai" },
...

                    -- Set source name
                    vim_item.menu = ({
                        cmp_ai = "[CMP_AI ]",
....
                    -- AI custom symbol and type
                    if entry.source.name == ("cmp_tabnine" or "cmp_ai") then
                        local detail = (entry.completion_item.labelDetails or {}).detail

                        vim_item.kind = ""

                        if detail and detail:find(".*%%.*") then
                            vim_item.kind = vim_item.kind .. " " .. detail
                        end

                        if (entry.completion_item.data or {}).multiline then
                            vim_item.menu = "[AI - ML]"
                        end
                    end

                    local maxwidth = 80
                    vim_item.abbr = string.sub(vim_item.abbr, 1, maxwidth)

                    return vim_item
                end,
                ....
                
            sorting = {
                priority_weight = 2,
                comparators = {
                    ai_compare,

Bard Error: json.choices returns nil instead of table

I'm trying to use the Bard backend with cmp-ai but I'm getting the error in the screenshot below.

Screenshot from 2023-06-20 05-50-43

Just to make sure it's not a problem with my Bard API installation, I can successfully call the Bard API from a Python REPL as you can see in the screenshot below.

Screenshot from 2023-06-20 06-05-12

The culprit seems to be json.choices returning nil instead of a table on line 83 in the bard backend.

Let me know if you need me to provide further details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.