mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-03 20:32:38 +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
|
|
@ -79,6 +79,7 @@ class Processor(ConsumerProducer):
|
|||
|
||||
print(f"Handling prompt {id}...", flush=True)
|
||||
|
||||
system = v.system
|
||||
prompt = v.prompt
|
||||
|
||||
try:
|
||||
|
|
@ -88,7 +89,7 @@ class Processor(ConsumerProducer):
|
|||
output = self.cohere.chat(
|
||||
model=self.model,
|
||||
message=prompt,
|
||||
preamble = "You are a helpful AI-assistant.",
|
||||
preamble = system,
|
||||
temperature=self.temperature,
|
||||
chat_history=[],
|
||||
prompt_truncation='auto',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue