mirror of
https://github.com/aljazceru/dev-gpt.git
synced 2025-12-26 18:04:24 +01:00
fix: fix formatting of system message
This commit is contained in:
@@ -93,9 +93,9 @@ class _GPTConversation:
|
||||
if 'executor' in system_definition_examples:
|
||||
system_message += f'\n{executor_example}'
|
||||
if 'docarray' in system_definition_examples:
|
||||
system_message += f'{docarray_example}'
|
||||
system_message += f'\n{docarray_example}'
|
||||
if 'client' in system_definition_examples:
|
||||
system_message += f'{client_example}'
|
||||
system_message += f'\n{client_example}'
|
||||
self.prompt_list[0] = ('system', system_message)
|
||||
|
||||
def get_response_from_stream(self, response_generator):
|
||||
|
||||
@@ -27,14 +27,16 @@ An Executor gets a DocumentArray as input and returns a DocumentArray as output.
|
||||
docarray_example = f'''A DocumentArray is a python class that can be seen as a list of Documents.
|
||||
A Document is a python class that represents a single document.
|
||||
Here is the protobuf definition of a Document:
|
||||
|
||||
```
|
||||
message DocumentProto {{
|
||||
// used to store json data the executor gets and returns
|
||||
string text = 1;
|
||||
}}
|
||||
```
|
||||
|
||||
Here are examples of how a DocumentArray can be defined:
|
||||
|
||||
```
|
||||
from jina import DocumentArray, Document
|
||||
import json
|
||||
|
||||
@@ -52,6 +54,7 @@ array_list = array.tolist()
|
||||
d3 = Document(text=json.dumps(array_list))
|
||||
d4 = Document()
|
||||
d4.text = '{{"uri": "https://.../logo.png"}}'
|
||||
```
|
||||
'''
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user