Skip to content

Bad UX | Copying Python Code from UI Button doesn't preserve indentation #4429

@robinnarsinghranabhat

Description

@robinnarsinghranabhat

🚀 Describe the new functionality needed

https://llamastack.github.io/docs/building_applications/rag#2-connect-with-openai-client

While Manually Dragging and selecting the code works, when using the Copy Button to paste code into vscode, This is what I get :

...
...
file_id = client.files.create(file=(url, pseudo_file, "text/html"), purpose="assistants").id
client.vector_stores.files.create(vector_store_id=vs.id, file_id=file_id)

resp = client.responses.create(
model="gpt-4o",
input="How do you do great work? Use the existing knowledge_search tool.",
tools=[{"type": "file_search", "vector_store_ids": [vs.id]}],
include=["file_search_call.results"],
)
...

💡 Why is this needed? What if we don't build it?

Fix seems something simple, but it's actually very annoying for User to manually update the indentation.

Other thoughts

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions