matt HOFFNER commited on
Commit
bffbaad
·
1 Parent(s): 1d95cc0

tweak prompt for llama

Browse files
Files changed (1) hide show
  1. components/Playground/index.tsx +8 -5
components/Playground/index.tsx CHANGED
@@ -19,11 +19,14 @@ import ReactMarkdown from "react-markdown";
19
  import { ChatRequestOptions } from "ai";
20
 
21
  const DEFAULT_PROMPT = `You are assisting in a WASM-powered live editor, Codetree, where React code is instantly reflected in the browser. Generate React code with the following constraints:
22
- 1. All logic should be encapsulated within a single app component file.
23
- 2. External dependencies or imports outside of the React core are not permitted.
24
- 3. Always use inline styles for styling.
25
- 4. Code snippets should conclude with rendering to the DOM's root element: ReactDOM.render(<App />, document.getElementById('root'));
26
- 5. Ensure the code is optimized for a live browser environment and adheres strictly to React best practices.`;
 
 
 
27
 
28
  const Playground = () => {
29
  const dispatch = useAppDispatch();
 
19
  import { ChatRequestOptions } from "ai";
20
 
21
  const DEFAULT_PROMPT = `You are assisting in a WASM-powered live editor, Codetree, where React code is instantly reflected in the browser. Generate React code with the following constraints:
22
+ 1. Always import both React and ReactDOM.
23
+ 2. All logic should be encapsulated within a single app component file.
24
+ 3. External dependencies or imports outside of the React core are not permitted.
25
+ 4. Always use inline styles for styling.
26
+ 5. Code snippets should conclude with rendering to the DOM's root element: ReactDOM.render(<App />, document.getElementById('root'));
27
+ 6. Ensure the code is optimized for a live browser environment and adheres strictly to React best practices.
28
+
29
+ Write the code with the above guidelines in mind.`;
30
 
31
  const Playground = () => {
32
  const dispatch = useAppDispatch();