Component Parameters
Override a Pop component parameters for one source
A Pop component can be given parameters when the Pop is defined — a VLM's prompt, a confidence threshold. Component parameters override those for one source, so a single session can ask a different question of every image without redefining the Pop.
Give the component an id in the Pop, then reference that id when you submit the source.
from eyepop.worker.worker_types import ComponentParams, InferenceComponent, Pop
pop = Pop(components=[
InferenceComponent(id=1, ability="eyepop.image-contents:latest"),
])
with EyePopSdk.sync_worker(pop=pop) as endpoint:
result = endpoint.upload(
"photo.jpg",
params=[ComponentParams(componentId=1, values={
"prompts": [{"prompt": "How many people are wearing hard hats?"}],
})],
).predict()import { EyePop, PopComponentType } from '@eyepop.ai/eyepop'
const endpoint = await EyePop.workerEndpoint({
pop: {
components: [
{ type: PopComponentType.INFERENCE, id: 1, ability: 'eyepop.image-contents:latest' },
],
},
}).connect()
const results = await endpoint.process({
source: { path: 'photo.jpg' },
componentParams: [
{
componentId: 1,
values: { prompts: [{ prompt: 'How many people are wearing hard hats?' }] },
},
],
})Which values a component accepts depends on its ability — see Abilities and Components.
Last updated
