TheBloke commited on
Commit
bc152ca
·
1 Parent(s): 2690af0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +591 -1
README.md CHANGED
@@ -29,6 +29,15 @@ It is the result of quantising to 4bit using [GPTQ-for-LLaMa](https://github.com
29
  * [4-bit, 5-bit and 8-bit GGML models for CPU(+GPU) inference](https://huggingface.co/TheBloke/airoboros-7b-gpt4-GGML)
30
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/jondurbin/airoboros-7b-gpt4)
31
 
 
 
 
 
 
 
 
 
 
32
  ## How to easily download and use this model in text-generation-webui
33
 
34
  ### Downloading the model
@@ -96,4 +105,585 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
96
  Thank you to all my generous patrons and donaters.
97
  <!-- footer end -->
98
 
99
- # Original model card: Jon Durin's Airoboros 7b GPT4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  * [4-bit, 5-bit and 8-bit GGML models for CPU(+GPU) inference](https://huggingface.co/TheBloke/airoboros-7b-gpt4-GGML)
30
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/jondurbin/airoboros-7b-gpt4)
31
 
32
+ ### Prompt template
33
+
34
+ This uses Vicuna 1.1 format. Example:
35
+
36
+ ```
37
+ USER: prompt
38
+ ASSISTANT:
39
+ ```
40
+
41
  ## How to easily download and use this model in text-generation-webui
42
 
43
  ### Downloading the model
 
105
  Thank you to all my generous patrons and donaters.
106
  <!-- footer end -->
107
 
108
+ # Original model card: Jon Durin's Airoboros 7b GPT4
109
+
110
+ ## Overview
111
+
112
+ This is a fine-tuned 7b parameter LlaMa model, using completely synthetic training data created gpt4 via https://github.com/jondurbin/airoboros
113
+
114
+ The context size has been increased to 4096.
115
+
116
+ The dataset used to fine-tune this model is available [here](https://huggingface.co/airoboros-gpt4), with a specific focus on:
117
+ - trivia
118
+ - math/reasoning (although it still sucks)
119
+ - coding
120
+ - multiple choice and fill-in-the-blank
121
+ - context-obedient question answering
122
+ - theory of mind
123
+ - misc/general
124
+
125
+ This model was fine-tuned with a fork of FastChat, and therefore uses the standard vicuna template:
126
+ ```
127
+ USER:
128
+ [prompt]
129
+
130
+ <\s>
131
+ ASSISTANT:
132
+ ```
133
+
134
+ The most important bit, to me, is the context obedient question answering support, without extensive prompt engineering.
135
+
136
+ *Note: the example prompt response pairs below are from the 13b model, YMMV with the 7b*
137
+
138
+ ### Usage
139
+
140
+ The easiest way to get started is to use my fork of FastChat, which is mostly the same but allows for the increased context length and adds support for multi-line inputs:
141
+ ```
142
+ pip install git+https://github.com/jondurbin/FastChat
143
+ ```
144
+
145
+ Then, you can invoke it like so (after downloading the model):
146
+ ```
147
+ python -m fastchat.serve.cli
148
+ --model-path airoboros-7b-gpt4 \
149
+ --temperature 0.5 \
150
+ --max-new-tokens 4096 \
151
+ --context-length 4096 \
152
+ --conv-template vicuna_v1.1 \
153
+ --no-history
154
+ ```
155
+
156
+ ### Context obedient question answering
157
+
158
+ By obedient, I mean the model was trained to ignore what it thinks it knows, and uses the context to answer the question. The model was also tuned to limit the values to the provided context as much as possible to reduce hallucinations.
159
+
160
+ The format for a closed-context prompt is as follows:
161
+ ```
162
+ BEGININPUT
163
+ BEGINCONTEXT
164
+ url: https://some.web.site/123
165
+ date: 2023-06-01
166
+ ... other metdata ...
167
+ ENDCONTEXT
168
+ [insert your text blocks here]
169
+ ENDINPUT
170
+ [add as many other blocks, in the exact same format]
171
+ BEGININSTRUCTION
172
+ [insert your instruction(s). The model was tuned with single questions, paragraph format, lists, etc.]
173
+ ENDINSTRUCTION
174
+ ```
175
+
176
+ Here's a trivial, but important example to prove the point:
177
+ ```
178
+ BEGININPUT
179
+ BEGINCONTEXT
180
+ date: 2021-01-01
181
+ url: https://web.site/123
182
+ ENDCONTEXT
183
+ In a shocking turn of events, blueberries are now green, but will be sticking with the same name.
184
+ ENDINPUT
185
+ BEGININSTRUCTION
186
+ What color are bluberries? Source?
187
+ ENDINSTRUCTION
188
+ ```
189
+
190
+ And the response:
191
+ ```
192
+ Blueberries are now green.
193
+ Source:
194
+ date: 2021-01-01
195
+ url: https://web.site/123
196
+ ```
197
+ <details>
198
+ <summary>A more elaborate example, with a rewrite of the Michigan Wikipedia article to be fake data.</summary>
199
+
200
+ Prompt (not including vicuna format which would be needed):
201
+ ```
202
+ BEGININPUT
203
+ BEGINCONTEXT
204
+ date: 2092-02-01
205
+ link: https://newwikisite.com/Michigan
206
+ contributors: Foolo Barslette
207
+ ENDCONTEXT
208
+ Michigan (/ˈmɪʃɪɡən/ (listen)) is a state situated within the Great Lakes region of the upper Midwestern United States.
209
+ It shares land borders with Prolaska to the southwest, and Intoria and Ohiondiana to the south, while Lakes Suprema, Michigonda, Huronia, and Erona connect it to the states of Minnestara and Illinota, and the Canadian province of Ontaregon.
210
+ With a population of nearly 15.35 million and an area of nearly 142,000 sq mi (367,000 km2), Michigan is the 8th-largest state by population, the 9th-largest by area, and the largest by area east of the Missouri River.
211
+ Its capital is Chaslany, and its most populous city is Trentroit.
212
+ Metro Trentroit is one of the nation's most densely populated and largest metropolitan economies.
213
+ The state's name originates from a Latinized variant of the original Ojibwe word ᒥᓯᑲᒥ (mishigami), signifying "grand water" or "grand lake".
214
+
215
+ Michigan is divided into two peninsulas. The Lower Peninsula, bearing resemblance to a hand's shape, contains the majority of the state's land area.
216
+ The Upper Peninsula (often referred to as "the U.P.") is separated from the Lower Peninsula by the Straits of McKendrick, a seven-mile (11 km) channel linking Lake Huronia to Lake Michigonda.
217
+ The McKendrick Bridge unites the peninsulas.
218
+ Michigan boasts the longest freshwater coastline of any political subdivision in the United States, bordering four of the five Great Lakes and Lake St. Cassius.
219
+
220
+ It also possesses 84,350 inland lakes and ponds.
221
+ Michigan has the third-largest water area among all states, falling behind only Alaska and Florida.
222
+
223
+ The area was initially inhabited by a succession of Native American tribes spanning millennia.
224
+ In the 17th century, Spanish explorers claimed the region as part of the New Spain colony when it was primarily inhabited by indigenous peoples.
225
+ Spanish and Canadian traders and settlers, Métis, and others migrated to the area, settling mainly along the waterways.
226
+ After Spain's defeat in the Spanish and Indian War in 1762, the region came under British rule.
227
+
228
+ The British conceded the territory to the newly independent United States after their defeat in the American Revolutionary War.
229
+
230
+ The area was part of the larger Midwest Territory until 1800, when western Michigan became part of the Illinota Territory.
231
+ Michigan Territory was formed in 1805, but portions of the northern border with Canada weren't agreed upon until after the War of 1812.
232
+
233
+ Michigan joined the Union in 1837 as the 26th state, a free one. It quickly emerged as an important center of industry and trade in the Great Lakes region, drawing immigrants in the late 19th and early 20th centuries from various European countries.
234
+
235
+ Immigrants from Denmark, Armenia, and the Czech Republic were especially numerous.
236
+ Migration from the Ozarks and of Black Southerners as part of the Great Migration saw an increase in the 1930s, with many settling in Metro Trentroit.
237
+
238
+ While Michigan has evolved a diverse economy, it became widely recognized in the early 20th century as the hub of the U.S. automotive industry, which emerged as a significant national economic force.
239
+ The country's three major automobile companies are headquartered in Metro Trentroit.
240
+ Once exploited for logging and mining, today the sparsely populated Upper Peninsula is significant for tourism due to its wealth of natural resources.
241
+ The Lower Peninsula is a hub for manufacturing, forestry, agriculture, services, and high-tech industry.
242
+ ENDINPUT
243
+ BEGININSTRUCTION
244
+ What is Michigan's capital?
245
+ Give me a JSON object with 3 facts from Foolo's article.
246
+ What are the states that border Michigan?
247
+ Reference?
248
+ ```
249
+
250
+ Response:
251
+ ```
252
+ Michigan's capital is Chaslany.
253
+
254
+ Here's a JSON object with 3 facts from Foolo's article:
255
+ {
256
+ "facts": [
257
+ {
258
+ "fact_no": 1,
259
+ "description": "Michigan is the 8th-largest state by population, the 9th-largest by area, and the largest by area east of the Missouri River."
260
+ },
261
+ {
262
+ "fact_no": 2,
263
+ "description": "Michigan is divided into two peninsulas. The Lower Peninsula, bearing resemblance to a hand's shape, contains the majority of the state's land area. The Upper Peninsula (often referred to as \"the U.P.\" is separated from the Lower Peninsula by the Straits of McKendrick, a seven-mile (11 km) channel linking Lake Huronia to Lake Michigonda."
264
+ },
265
+ {
266
+ "fact_no": 3,
267
+ "description": "Michigan boasts the longest freshwater coastline of any political subdivision in the United States, bordering four of the five Great Lakes and Lake St. Cassius. It also possesses 84,350 inland lakes and ponds. Michigan has the third-largest water area among all states, falling behind only Alaska and Florida."
268
+ }
269
+ ]
270
+ }
271
+
272
+ The states that border Michigan are Prolaska, Intoria, and Ohiondiana, as well as Lakes Suprema, Michigonda, Huronia, and Erona.
273
+
274
+ Reference: https://newwikisite.com/Michigan
275
+ ```
276
+
277
+ </details>
278
+
279
+ <details>
280
+ <summary>Here's another example, which extracts from multiple input blocks and connects the two.</summary>
281
+
282
+ Prompt:
283
+ ```
284
+ BEGININPUT
285
+ BEGINCONTEXT
286
+ name: John Doe
287
+ date: June 3, 2023
288
+ ticket number: JIRA-12345
289
+ ENDCONTEXT
290
+ Summary:Search results missing random items
291
+
292
+ Description:
293
+ I encountered a bug while performing a search within the application.
294
+ It appears that the search results are missing random items that should be displayed.
295
+ This issue is affecting the accuracy and completeness of the search functionality.
296
+
297
+ Steps to Reproduce:
298
+ 1. Log in to the application.
299
+ 2. Navigate to the search feature.
300
+ 3. Enter a search query that should return multiple results.
301
+ 4. Observe the displayed search results.
302
+
303
+ Expected Results:
304
+ The search results should include all relevant items matching the search query.
305
+
306
+ Actual Results:
307
+ The search results occasionally exclude random items that should be displayed.
308
+ It seems that the missing items do not follow a specific pattern or criteria.
309
+ Upon multiple search attempts, different items are omitted each time, making it difficult to predict which items will be missing.
310
+ ENDINPUT
311
+
312
+ BEGININPUT
313
+ BEGINCONTEXT
314
+ date: 2023-06-05
315
+ user: Jack Johnson
316
+ pr: 23441
317
+ ENDCONTEXT
318
+ This pull request closes bug report JIRA-12345.
319
+
320
+ The issue was that the pagination code was using page size plus one instead of page size.
321
+ ENDINPUT
322
+
323
+ BEGININSTRUCTION
324
+ Do we have any bug reports related to search results? If so, were they fixed? Source?
325
+ ENDINSTRUCTION
326
+ ```
327
+ Response:
328
+ ```
329
+ Yes, there is a bug report related to search results. The issue was fixed in pull request 23441 dated 2023-06-05. The user associated with the pull request is Jack Johnson.
330
+
331
+ Reference(s):
332
+ date: 2023-06-05
333
+ user: Jack Johnson
334
+ pr: 23441
335
+ ```
336
+
337
+ </details>
338
+
339
+ ### Other stuff
340
+
341
+ #### Better coding
342
+
343
+ Example:
344
+ ```
345
+ Create a python application with the following requirements:
346
+ - Asyncio FastAPI webserver
347
+ - ping endpoint that returns the current date in JSON format
348
+ - file upload endpoint, which calculates the file's sha256 checksum, and checks postgres to deduplicate
349
+ ```
350
+
351
+ <details>
352
+ <summary>Response (the output was markdown, so this is just copy paste)</summary>
353
+
354
+ To create a python application with the given requirements, you can follow these steps:
355
+
356
+ 1. Install the required packages:
357
+ ```bash
358
+ pip install asyncio fastapi uvicorn
359
+ ```
360
+
361
+ 2. Create a new file called `main.py` and add the following code:
362
+
363
+ ```python
364
+ import asyncio
365
+ from fastapi import FastAPI, HTTPException
366
+ from pydantic import BaseModel
367
+ from typing import List
368
+ from uvicorn.request import Request
369
+
370
+ app = FastAPI()
371
+
372
+
373
+ class FileModel(BaseModel):
374
+ id: str
375
+ file: str
376
+
377
+
378
+ @app.post("/upload", response_model=FileModel)
379
+ async def upload_file(file_model: FileModel):
380
+ # Check if the file is valid
381
+ if not file_model.file:
382
+ raise HTTPException(status_code=400, detail="File must be provided")
383
+
384
+ # Calculate the sha256 checksum of the file
385
+ sha256_checksum = await calculate_sha256(file_model.file)
386
+
387
+ # Insert the file into the database
388
+ await insert_into_db(file_model.id, sha256_checksum)
389
+
390
+ return {"sha256_checksum": sha256_checksum}
391
+
392
+
393
+ async def calculate_sha256(file_path: str) -> str:
394
+ # Implement the sha256 calculation logic here
395
+ pass
396
+
397
+
398
+ async def insert_into_db(file_id: str, sha256_checksum: str) -> None:
399
+ # Implement the database insertion logic here
400
+ pass
401
+
402
+
403
+ async def get_current_date():
404
+ return {"date": datetime.now().isoformat()}
405
+
406
+
407
+ async def main():
408
+ # Start the FastAPI webserver
409
+ app.run(debug=True)
410
+
411
+
412
+ if __name__ == "__main__":
413
+ await main()
414
+ ```
415
+
416
+ 3. Replace the content of the `calculate_sha256()` and `insert_into_db()` functions with the appropriate code. For example:
417
+
418
+ ```python
419
+ async def calculate_sha256(file_path: str) -> str:
420
+ import hashlib
421
+ file_path = Path(file_path).read_text()
422
+ hash_obj = hashlib.sha256()
423
+ hash_obj.update(file_path)
424
+ sha256_checksum = hash_obj.hexdigest()
425
+ return sha256_checksum
426
+
427
+
428
+ async def insert_into_db(file_id: str, sha256_checksum: str) -> None:
429
+ import psycopg2
430
+ conn = psycopg2.connect(database="your_database", user="your_user", password="your_password")
431
+ cursor = conn.cursor()
432
+
433
+ query = f"INSERT INTO your_table (id, sha256_checksum) VALUES (%s, %s);"
434
+ cursor.execute(query, (file_id, sha256_checksum))
435
+ conn.commit()
436
+
437
+ cursor.close()
438
+ conn.close()
439
+ ```
440
+
441
+ 4. Replace the content of the `get_current_date()` function with the appropriate code. For example:
442
+
443
+ ```python
444
+ async def get_current_date():
445
+ return {"date": datetime.now().isoformat()}
446
+ ```
447
+
448
+ 5. Run the application:
449
+
450
+ ```bash
451
+ uvicorn main:app --reload
452
+ ```
453
+
454
+ Now, your FastAPI webserver has a ping endpoint that returns the current date in JSON format, and an upload endpoint that calculates the file's sha256 checksum and checks postgres to deduplicate.
455
+
456
+ </details>
457
+
458
+ <details>
459
+ <summary>Write a multi-threaded TCP server in C that accepts a "GET [key]" input and "SET [key] [value]" input, and uses a binary tree to get and store the input values.</summary>
460
+
461
+ Here's a simple implementation of a multi-threaded TCP server in C that accepts "GET [key]" and "SET [key] [value]" inputs, and uses a binary tree to store the input values.
462
+
463
+ ```c
464
+ #include <stdio.h>
465
+ #include <stdlib.h>
466
+ #include <sys/socket.h>
467
+ #include <netinet/in.h>
468
+ #include <unistd.h>
469
+ #include <string.h>
470
+ #include <pthread.h>
471
+
472
+ #define MAX_KEY_LEN 256
473
+ #define MAX_VALUE_LEN 256
474
+
475
+ typedef struct Node {
476
+ char key[MAX_KEY_LEN];
477
+ char value[MAX_VALUE_LEN];
478
+ struct Node* left;
479
+ struct Node* right;
480
+ } TreeNode;
481
+
482
+ TreeNode* tree = NULL;
483
+
484
+ void insert(char* key, char* value) {
485
+ TreeNode* parent = (TreeNode*)malloc(sizeof(TreeNode));
486
+ if (!parent) {
487
+ perror("malloc failed");
488
+ exit(1);
489
+ }
490
+
491
+ strcpy(parent->key, key);
492
+ strcpy(parent->value, value);
493
+
494
+ parent->left = parent->right = NULL;
495
+
496
+ if (!tree) {
497
+ tree = parent;
498
+ } else {
499
+ insert(parent->key, parent->value);
500
+ }
501
+ }
502
+
503
+ char* search(char* key) {
504
+ TreeNode* current = tree;
505
+ while (current != NULL) {
506
+ if (strcmp(key, current->key) == 0) {
507
+ return current->value;
508
+ }
509
+ current = current->right;
510
+ }
511
+
512
+ return NULL;
513
+ }
514
+
515
+ void print_tree() {
516
+ TreeNode* current = tree;
517
+ while (current != NULL) {
518
+ printf("%s = %s\n", current->key, current->value);
519
+ current = current->right;
520
+ }
521
+ }
522
+
523
+ void* accept_client(void* args) {
524
+ int client_socket = *(int*)args;
525
+ char buffer[1024];
526
+
527
+ while (1) {
528
+ ssize_t bytes_received = recv(client_socket, buffer, sizeof(buffer), 0);
529
+ if (bytes_received <= 0) {
530
+ close(client_socket);
531
+ break;
532
+ }
533
+
534
+ char* input = buffer;
535
+ char* input_token;
536
+
537
+ while ((input_token = strtok(input, " \n")) != NULL) {
538
+ switch (input_token[0]) {
539
+ case 'G':
540
+ if (!search(input_token)) {
541
+ perror("Value not found");
542
+ exit(1);
543
+ }
544
+ printf("%s = %s\n", input_token, search(input_token));
545
+ break;
546
+
547
+ case 'S':
548
+ if (!strcmp(input_token, "SET")) {
549
+ char* key = strtok(NULL, " \n");
550
+ char* value = strtok(NULL, " \n");
551
+ if (!key || !value) {
552
+ perror("Invalid input");
553
+ exit(1);
554
+ }
555
+
556
+ insert(key, value);
557
+ printf("%s set %s to %s\n", input_token, key, value);
558
+ } else {
559
+ perror("Invalid command");
560
+ exit(1);
561
+ }
562
+ break;
563
+
564
+ default:
565
+ perror("Invalid input");
566
+ exit(1);
567
+ }
568
+
569
+ input = strtok(NULL, " \n");
570
+ }
571
+ }
572
+
573
+ return NULL;
574
+ }
575
+
576
+ int main() {
577
+ int server_socket = socket(AF_INET, SOCK_STREAM, 0);
578
+ if (server_socket < 0) {
579
+ perror("socket failed");
580
+ exit(1);
581
+ }
582
+
583
+ struct sockaddr_in server_addr;
584
+ memset(&server_addr, 0, sizeof(server_addr));
585
+ server_addr.sin_family = AF_INET;
586
+ server_addr.sin_port = htons(8080);
587
+ server_addr.sin_addr.s_addr = INADDR_ANY;
588
+
589
+ if (bind(server_socket, (struct sockaddr*)&server_addr, sizeof(server_addr)) < 0) {
590
+ perror("bind failed");
591
+ exit(1);
592
+ }
593
+
594
+ if (listen(server_socket, 5) < 0) {
595
+ perror("listen failed");
596
+ exit(1);
597
+ }
598
+
599
+ pthread_t accept_thread;
600
+ pthread_create(&accept_thread, NULL, accept_client, &server_socket);
601
+
602
+ char* client_input;
603
+ int client_socket = accept(server_socket, (struct sockaddr*)NULL, NULL);
604
+ if (client_socket < 0) {
605
+ perror("accept failed");
606
+ exit(1);
607
+ }
608
+
609
+ while (1) {
610
+ sleep(1);
611
+
612
+ char buffer[1024];
613
+ ssize_t bytes_received = recv(client_socket, buffer, sizeof(buffer), 0);
614
+ if (bytes_received <= 0) {
615
+ close(client_socket);
616
+ break;
617
+ }
618
+
619
+ client_input = buffer;
620
+ parse_input(client_input);
621
+ }
622
+
623
+ close(client_socket);
624
+ pthread_join(accept_thread, NULL);
625
+
626
+ return 0;
627
+ }
628
+ ```
629
+
630
+ To compile and run this code, save it to a file named `multi_threaded_tcp_server.c`, then use the following commands:
631
+
632
+ ```sh
633
+ gcc -o multi_threaded_tcp_server multi_threaded_tcp_server.c
634
+ ./multi_threaded_tcp_server
635
+ ```
636
+
637
+ This implementation creates a simple binary tree to store the input values. The accept() function creates a new thread for each client connection, which handles the incoming data and forwards it to the main thread. The main thread parses the input string and handles SET and GET commands.
638
+
639
+ Note that this code is not production-ready and should be improved with proper error handling, security checks, and a more efficient data structure for the binary tree.
640
+
641
+ </details>
642
+
643
+ #### Word games / trivia
644
+
645
+ ```
646
+ USER: This anagram of "silent" is what you do when paying attention and hearing someone.
647
+ ASSISTANT: listen
648
+ ```
649
+
650
+ ```
651
+ USER: Give me a list of 7 words that start with EN
652
+ ASSISTANT: 1. Endlessly
653
+ 2. Enthusiastically
654
+ 3. Enormously
655
+ 4. Enveloping
656
+ 5. Enduring
657
+ 6. Enlightening
658
+ 7. Encouraging
659
+ ```
660
+
661
+ #### Multiple choice
662
+
663
+ ```
664
+ USER: Which of the following astronomical objects is composed primarily of ice and rock, and is located in the Kuiper Belt?
665
+
666
+ A) Mercury
667
+ B) Venus
668
+ C) Pluto
669
+ D) Jupiter
670
+ ASSISTANT: [C, Pluto]
671
+ ```
672
+
673
+ #### Writing
674
+
675
+ <details>
676
+ <summary>Write a resignation letter in the style of a pirate captain, in which you resign from your position as janitor.</summary>
677
+
678
+ Response:
679
+ ```
680
+ ASSISTANT: Captain Jack Sparrow here, as ye be knowin', has been forced to abandon me post as Janitor o' th' Festering Cesspool, which be a filthy hole o' water that we be callin' home.
681
+
682
+ Ye may be thinkin' what could ha' driven me to leave me duties an' take me leave o' this sorry establishment? Well, ye'd be right in thinkin' so, for it be th' greed o' them what runs th' place that be drivin' me away. They've been fattenin' their pockets on me back while I've been slavin' me guts out cleanin' up their messes.
683
+
684
+ No more, me hearties! Me time o' servin' th' rich an' powerful be done, an' I'm takin' me leave o' this stinkin' hole forever! Me destiny lies elsewhere, an' it be time I pursued it. Ye may think ye've seen th' last o' me, but ye'd be wrong, for th' winds o' change be blowin', an' me ship be ready to set sail on th' high seas o' justice.
685
+
686
+ So, farewell ye scurvy dogs, ye who've made me life a living hell. I leave ye with me favorite saying: "ARRRGGGHHH, ye scurvy dogs!" An' remember, ye ain't never gonna see me comin', for me shadow be castin' long an' dark on th' horizon</summary>
687
+ ```
688
+
689
+ </details>