Skip to content

[FR/Q] How do I comment a line of the snippet from being included in the snippet? #1195

@NightMachinery

Description

@NightMachinery

I have this snippet:

# -*- mode: snippet -*-
# name: llm-c3o
# key: <l
# uuid: <l
# --
#+begin_src jupyter-python :kernel py_base :session claude_1 :async yes :exports both
res = openai_chat_complete(
    ##
    model="OR:anthropic/claude-3-opus:beta",
    # model="OR:anthropic/claude-3-sonnet:beta",
    # model="OR:anthropic/claude-3-haiku:beta",
    # model="OR:mistralai/mistral-large",
    # model="OR:perplexity/sonar-medium-online",
    # model="gpt-4-turbo",
    # model="gpt-4-0314",
    # model="gpt-4-0613",
    # model="claude-3-opus-20240229",
    ##
    messages=[
        # {"role": "system", "content": \"""Output your changes in the unified diff format.\"""},
        {"role": "user", "content": r\"""
        `%`$0
        \"""},
    ],
    temperature=0,
    max_tokens=4000,
    interactive=True,
)

print_chat_streaming(res, copy_mode=None) # "chat2"
bell_gpt()
#+end_src

I want to comment some of the model=... lines such that they remain in the snippet file, but are never expanded. (I.e., if we treat the above snippet template as code, I want to add some comments to it.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions