|
|
|
|
|
import gpt4all |
|
model = gpt4all.GPT4All("ggml-gpt4all-j-v1.3-groovy.bin") |
|
|
|
|
|
|
|
def print_response(prompt: str) -> str: |
|
messages = [{'role': 'user', 'content': prompt}] |
|
response = model.chat_completion(messages) |
|
print(response) |
|
|
|
|
|
print_response(""" |
|
# Templates: |
|
|
|
## dropdown template: |
|
```html |
|
<select class="custom-control"> |
|
<option value="">- Please select -</option> |
|
<option value="1">1</option> |
|
<option value="2">2</option> |
|
</select> |
|
``` |
|
|
|
## radio template: |
|
```html |
|
<input class="custom-control" type="radio"/> |
|
``` |
|
|
|
# Task: |
|
Use just one of the templates above to write HTML code for a dropdown of the Canadian provinces/territories, with these values: |
|
Alberta |
|
British Columbia |
|
Manitoba |
|
New Brunswick |
|
Newfoundland and Labrador |
|
Northwest Territories |
|
Nova Scotia |
|
Nunavut |
|
Ontario |
|
Prince Edward Island |
|
Quebec |
|
Saskatchewan |
|
Yukon |
|
""") |