Giter Site home page Giter Site logo

Comments (2)

JungeWerther avatar JungeWerther commented on June 15, 2024 1

Actually now it suddenly started working after reinstalling the extension and waiting a bit. Weirdly, because the first time around it didn't work.

Maybe reloading the window didn't initially update the config because the server wasn't closed on host machine (ssh connection).

Config was

`"""
This is the Continue configuration file.

See https://continue.dev/docs/customization to for documentation of the available options.
"""
from continuedev.libs.llm.ggml import GGML
from continuedev.libs.llm.prompts.chat import llama2_template_messages
from continuedev.libs.llm.prompts.edit import alpaca_edit_prompt
from continuedev.libs.llm.prompts.chat import template_alpaca_messages
from continuedev.libs.llm.llamacpp import LlamaCpp

from continuedev.core.models import Models
from continuedev.core.config import CustomCommand, SlashCommand, ContinueConfig
from continuedev.libs.llm import OpenAIFreeTrial

from continuedev.plugins.context_providers import (
    DiffContextProvider,
    TerminalContextProvider,
    URLContextProvider,
    GitHubIssuesContextProvider
)
from continuedev.plugins.steps import (
    ClearHistoryStep,
    CommentCodeStep,
    EditHighlightedCodeStep,
    GenerateShellCommandStep,
    OpenConfigStep,
)
from continuedev.plugins.steps.share_session import ShareSessionStep

config = ContinueConfig(
    allow_anonymous_telemetry=True,
    models=Models(
		saved=[OpenAIFreeTrial(
			model="gpt-4"
		),
		GGML(
			title="WizardCoder-13b-Python",
			model="wizardcoder:13b-python",
			context_length=4096,
			prompt_templates={'edit': {'model': None, 'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': ['```'], 'max_tokens': 600, 'functions': None, 'prompt': 'Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction: Rewrite the code to satisfy this request: "{{{user_input}}}"\n\n### Input:\n\n```\n{{{code_to_edit}}}\n```\n\n### Response:\n\n```\n', 'raw': True}},
			template_messages=template_alpaca_messages,
			server_url="http://localhost:8080/v1/"
		),
		GGML(
			title="WizardCoder-13b-Python",
			model="wizardcoder:13b-python",
			prompt_templates={'edit': {'model': None, 'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': ['```'], 'max_tokens': 600, 'functions': None, 'prompt': 'Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction: Rewrite the code to satisfy this request: "{{{user_input}}}"\n\n### Input:\n\n```\n{{{code_to_edit}}}\n```\n\n### Response:\n\n```\n', 'raw': True}},
			template_messages=template_alpaca_messages
		),
		OpenAIFreeTrial(
			model="gpt-3.5-turbo"
		),
		GGML(
			title="CodeLlama-7b-Instruct",
			model="codellama:7b-instruct"
		)],
		default=GGML(
			title="WizardCoder-13b-Python",
			model="wizardcoder:13b-python",
			prompt_templates={'edit': {'model': None, 'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': ['```'], 'max_tokens': 600, 'functions': None, 'prompt': 'Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction: Rewrite the code to satisfy this request: "{{{user_input}}}"\n\n### Input:\n\n```\n{{{code_to_edit}}}\n```\n\n### Response:\n\n```\n', 'raw': True}},
			template_messages=template_alpaca_messages,
			api_base="http://localhost:8080/v1"
		)
	),
    system_message="",
    temperature=0.5,
    custom_commands=[
        CustomCommand(
            name="test",
            description="Write unit tests for highlighted code",
            prompt="Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
        )
    ],
    slash_commands=[
        SlashCommand(
            name="edit",
            description="Edit highlighted code",
            step=EditHighlightedCodeStep,
        ),
        SlashCommand(
            name="config",
            description="Customize Continue",
            step=OpenConfigStep,
        ),
        SlashCommand(
            name="comment",
            description="Write comments for the highlighted code",
            step=CommentCodeStep,
        ),
        SlashCommand(
            name="clear",
            description="Clear step history",
            step=ClearHistoryStep,
        ),
        SlashCommand(
            name="share",
            description="Download and share this session",
            step=ShareSessionStep,
        ),
        SlashCommand(
            name="cmd",
            description="Generate a shell command",
            step=GenerateShellCommandStep,
        )
    ],
    context_providers=[
        # GitHubIssuesContextProvider(
        #     repo_name="<your github username or organization>/<your repo name>",
        #     auth_token="<your github auth token>"
        # ),
        DiffContextProvider(),
        URLContextProvider(
            preset_urls = [
                # Add any common urls you reference here so they appear in autocomplete
            ]
        ),
        TerminalContextProvider(),
    ],
)`

from continue.

sestinj avatar sestinj commented on June 15, 2024

@JungeWerther Could you share your config.py and I can try to quickly debug this?

from continue.

Related Issues (20)

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.