Are you sure you want to delete this access key?
This example demonstrates how to use Promptfoo with LM Studio for prompt evaluation. It showcases configuration for interacting with the LM Studio API using a locally hosted language model.
bartowski/gemma-2-9b-it-GGUF
model in LM Studio.Start LM Studio Server:
bartowski/gemma-2-9b-it-GGUF
model.http://localhost:1234
).Configure Promptfoo:
Create a promptfooconfig.yaml
file with the following content:
providers:
- id: 'http://localhost:1234/v1/chat/completions'
config:
method: 'POST'
headers:
'Content-Type': 'application/json'
body:
messages: '{{ prompt }}'
model: 'bartowski/gemma-2-9b-it-GGUF'
temperature: 0.7
max_tokens: -1
transformResponse: 'json.choices[0].message.content'
Note that you can view the specific configuration for each model within LM Studio's examples in the server tab.
Run Evaluation:
npx promptfoo eval
View Results:
npx promptfoo view
For more information, see the Promptfoo documentation on how to set up a custom HTTP provider.
Press p or to see the previous file or, n or to see the next file
Browsing data directories saved to S3 is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with AWS S3!
Are you sure you want to delete this access key?
Browsing data directories saved to Google Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with Google Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to Azure Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with Azure Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to S3 compatible storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with your S3 compatible storage!
Are you sure you want to delete this access key?