Get Prompt By Id
POST/get_prompt_by_id
Get a single prompt given id in a dataset
Request
- application/json
Body
required
- MOD1
- MOD1
- MOD1
- MOD1
- MOD1
- MOD1
- MOD1
- MOD1
- MOD2
Array [
]
- MOD1
- MOD2
config
object
required
custom_extract_logic: a piece of python code that calls submit_code_blocks(cbs)
to extract custom code
cbs: List[CodeBlock], CodeBlock(priority=40, code='xxx', language='xxx')
priority: fenced = 30, incomplete fenced = 20, heuristic = 10
dataset_type
object
the dataset class used to process, only works when the dataset id is not registered.
anyOf
string
language
object
anyOf
string
Possible values: [python
, cpp
, nodejs
, go
, go_test
, java
, php
, csharp
, bash
, typescript
, sql
, rust
, cuda
, lua
, R
, perl
, D_ut
, ruby
, scala
, julia
, pytest
, junit
, kotlin_script
, jest
, verilog
, python_gpu
, lean
, swift
, racket
]
locale
object
anyOf
string
is_fewshot
object
anyOf
boolean
compile_timeout
object
anyOf
number
run_timeout
object
anyOf
number
custom_extract_logic
object
anyOf
string
provided_data
object
anyOf
object
object
{}
id
object
required
anyOf
integer
string
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
id
object
required
anyOf
integer
string
{}
{
"id": 0,
"prompt": "string",
"labels": {}
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}