This commit is contained in:
ishaan-jaff 2023-09-15 12:26:44 -07:00
parent 97d9bf17c0
commit abd71bfb55
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,15 @@
# Mock Completion Responses - Save Testing Costs
Trying to test making LLM Completion calls without calling the LLM APIs ?
Pass `mock_response` to `litellm.completion` and litellm will directly return the response without neededing the call the LLM API and spend $$
## Using `mock_response`
```python
from litellm import completion
model = "gpt-3.5-turbo"
messages = [{"role":"user", "content":"Why is LiteLLM amazing?"}]
completion(model=model, messages=messages, mock_response="It's simple to use and easy to get started")
```

View file

@ -88,6 +88,7 @@ const sidebars = {
'tutorials/ab_test_llms', 'tutorials/ab_test_llms',
'tutorials/huggingface_tutorial', 'tutorials/huggingface_tutorial',
'tutorials/TogetherAI_liteLLM', 'tutorials/TogetherAI_liteLLM',
'tutorials/mock_completion',
'tutorials/finetuned_chat_gpt', 'tutorials/finetuned_chat_gpt',
'tutorials/sagemaker_llms', 'tutorials/sagemaker_llms',
'tutorials/text_completion', 'tutorials/text_completion',