Replies: 1 comment
-
i solved this problem by using the deepseek-chat model name directly, which likes coding as follows: import asyncio
import os
import guardrails as gd
import time
from guardrails.hub import CompetitorCheck
os.environ['DEEPSEEK_API_KEY'] = 'sk-xx'
async def main():
prompt = "Tell me about the Apple Iphone"
guard = gd.AsyncGuard().use(CompetitorCheck, ["Apple"])
raw_llm_output, validated_output, *rest = await guard(
model="deepseek/deepseek-chat",
messages=[{
"role": "system",
"content": prompt
}],
max_tokens=1024,
temperature=0.3,
)
print(guard.history.last) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
while using the above code to run the quick start of the async streaming example in the doc, a method sig check error was raising.
the details in the cmd is as follows:
hope someone can help me. THX !
Beta Was this translation helpful? Give feedback.
All reactions