mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-27 09:26:22 +02:00
Implement system in text completion API (#137)
* Add system prompt to LLM invocation * Added system parameter to LLMs * Added to Bedrock and VertexAI
This commit is contained in:
parent
53c958aaff
commit
65cda7b276
13 changed files with 24 additions and 13 deletions
|
|
@ -35,6 +35,8 @@ class LlmClient(BaseClient):
|
|||
output_schema=TextCompletionResponse,
|
||||
)
|
||||
|
||||
def request(self, prompt, timeout=300):
|
||||
return self.call(prompt=prompt, timeout=timeout).response
|
||||
def request(self, system, prompt, timeout=300):
|
||||
return self.call(
|
||||
system=system, prompt=prompt, timeout=timeout
|
||||
).response
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ from . types import Error
|
|||
# LLM text completion
|
||||
|
||||
class TextCompletionRequest(Record):
|
||||
system = String()
|
||||
prompt = String()
|
||||
|
||||
class TextCompletionResponse(Record):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue