forked from 0xWheatyz/SPARC
tests: testing modes have been added in an attempt to tune without wasting tokens.
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
|
||||
if self.test_mode:
|
||||
print(prompt)
|
||||
return "[TEST MODE]"
|
||||
|
||||
if not self.client:
|
||||
raise ValueError("LLM client not initialized. Please provide a valid API key.")
|
||||
|
||||
message = self.client.messages.create(
|
||||
model=self.model,
|
||||
max_tokens=2048,
|
||||
messages=[{"role": "user", "content": prompt}],
|
||||
)
|
||||
|
||||
return message.content[0].text
|
||||
|
||||
|
||||
Reference in New Issue
Block a user