microsoft / microsoft/copilot-camp

Lab B2 - 400 Validation error at #/data_sources/0/azure_search/parameters/role_information: Extra inputs are not permitted

Open
#553 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
664
Forks
175
Avg merge
1m
Merged PRs (30d)
7

Description

When going thru the lab there seems to be an issue with the

defaultPrompt: async () => {
const template = await prompts.getPrompt('chat');
const skprompt = fs.readFileSync(path.join(__dirname, '..', 'prompts', 'chat', 'skprompt.txt'));

const dataSources = (template.config.completion as any)['data_sources'];

dataSources.forEach((dataSource: any) => {
  if (dataSource.type === 'azure_search') {
    dataSource.parameters.authentication.key = config.azureSearchKey;
    dataSource.parameters.endpoint = config.azureSearchEndpoint;
    dataSource.parameters.index_name = config.indexName;
    dataSource.parameters.embedding_dependency.deployment_name =
      config.azureOpenAIEmbeddingDeploymentName;
    dataSource.parameters.role_information = `${skprompt.toString('utf-8')}`;
  }
});

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Lab B2 defaultPrompt implementation shown in the issue and inspect how prompts/chat/skprompt.txt is used to build the Azure Search data source. Reproduce the 400 validation error and compare the generated data_sources/0/azure_search/parameters object with the accepted schema. Done means the lab no longer sends the extra role_information input and validation succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.