[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F85HK2A55Y4NPDCC0PHRG8":3,"skill-same:01M6F85HK2A55Y4NPDCC0PHRG8":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":48,"linkOnly":49,"markdownContent":50,"markdownBody":51,"frontMatter":52,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":63,"ownerDescription":64,"updatedAt":65,"install":66,"resources":79},"01M6F85HK2A55Y4NPDCC0PHRG8","mistral-core-workflow-b",null,"Execute Mistral AI secondary workflows: Embeddings and Function Calling.\nUse when implementing semantic search, RAG applications,\nor tool-augmented LLM interactions.\nTrigger with phrases like \"mistral embeddings\", \"mistral function calling\",\n\"mistral tools\", \"mistral RAG\", \"mistral semantic search\".","Dicklesworthstone\u002Fpi_agent_rust","Dicklesworthstone","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35050222?v=4","01M6CG26AR942CSVMN1M5E3DSE","Jeff Emanuel","01M6CG26EPP71PSHW1VDS71121",1992,"MIT","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fmistral-pack\u002Fskills\u002Fmistral-core-workflow-b\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],"mistral core workflow b","core","Mistral","workflow","function calling","when","implementing","with","trigger","io","calling","use","edit","write","read","tool","Bash","applications","Tools","embeddings","search","semantic search","rag","workflows","2026-11-10 10:12:30",false,"---\nname: mistral-core-workflow-b\ndescription: |\n  Execute Mistral AI secondary workflows: Embeddings and Function Calling.\n  Use when implementing semantic search, RAG applications,\n  or tool-augmented LLM interactions.\n  Trigger with phrases like \"mistral embeddings\", \"mistral function calling\",\n  \"mistral tools\", \"mistral RAG\", \"mistral semantic search\".\nallowed-tools: Read, Write, Edit, Bash(npm:*), Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\n---\n\n# Mistral AI Core Workflow B: Embeddings & Function Calling\n\n## Overview\nSecondary workflows for Mistral AI: Text embeddings for semantic search and function calling for tool use.\n\n## Prerequisites\n- Completed `mistral-install-auth` setup\n- Familiarity with `mistral-core-workflow-a`\n- Valid API credentials configured\n\n## Embeddings\n\n### Step 1: Generate Text Embeddings\n\n```typescript\nimport Mistral from '@mistralai\u002Fmistralai';\n\nconst client = new Mistral({\n  apiKey: process.env.MISTRAL_API_KEY,\n});\n\nasync function getEmbedding(text: string): Promise\u003Cnumber[]> {\n  const response = await client.embeddings.create({\n    model: 'mistral-embed',\n    inputs: [text],\n  });\n\n  return response.data[0].embedding;\n}\n\n\u002F\u002F Usage\nconst embedding = await getEmbedding('Machine learning is fascinating.');\nconsole.log(`Embedding dimensions: ${embedding.length}`); \u002F\u002F 1024\n```\n\n### Step 2: Batch Embeddings\n\n```typescript\nasync function getBatchEmbeddings(texts: string[]): Promise\u003Cnumber[][]> {\n  const response = await client.embeddings.create({\n    model: 'mistral-embed',\n    inputs: texts,\n  });\n\n  return response.data.map(d => d.embedding);\n}\n\n\u002F\u002F Usage\nconst documents = [\n  'Python is a programming language.',\n  'JavaScript runs in browsers.',\n  'Rust is memory safe.',\n];\nconst embeddings = await getBatchEmbeddings(documents);\n```\n\n### Step 3: Semantic Search Implementation\n\n```typescript\nfunction cosineSimilarity(a: number[], b: number[]): number {\n  let dotProduct = 0;\n  let normA = 0;\n  let normB = 0;\n\n  for (let i = 0; i \u003C a.length; i++) {\n    dotProduct += a[i] * b[i];\n    normA += a[i] * a[i];\n    normB += b[i] * b[i];\n  }\n\n  return dotProduct \u002F (Math.sqrt(normA) * Math.sqrt(normB));\n}\n\ninterface Document {\n  id: string;\n  text: string;\n  embedding?: number[];\n}\n\nclass SemanticSearch {\n  private documents: Document[] = [];\n  private client: Mistral;\n\n  constructor() {\n    this.client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY });\n  }\n\n  async indexDocuments(docs: Omit\u003CDocument, 'embedding'>[]): Promise\u003Cvoid> {\n    const texts = docs.map(d => d.text);\n    const response = await this.client.embeddings.create({\n      model: 'mistral-embed',\n      inputs: texts,\n    });\n\n    this.documents = docs.map((doc, i) => ({\n      ...doc,\n      embedding: response.data[i].embedding,\n    }));\n  }\n\n  async search(query: string, topK = 5): Promise\u003CArray\u003CDocument & { score: number }>> {\n    const queryEmbedding = await this.getEmbedding(query);\n\n    const results = this.documents\n      .map(doc => ({\n        ...doc,\n        score: cosineSimilarity(queryEmbedding, doc.embedding!),\n      }))\n      .sort((a, b) => b.score - a.score)\n      .slice(0, topK);\n\n    return results;\n  }\n\n  private async getEmbedding(text: string): Promise\u003Cnumber[]> {\n    const response = await this.client.embeddings.create({\n      model: 'mistral-embed',\n      inputs: [text],\n    });\n    return response.data[0].embedding;\n  }\n}\n\n\u002F\u002F Usage\nconst search = new SemanticSearch();\nawait search.indexDocuments([\n  { id: '1', text: 'How to bake chocolate chip cookies' },\n  { id: '2', text: 'Machine learning fundamentals' },\n  { id: '3', text: 'Best practices for React development' },\n]);\n\nconst results = await search.search('AI tutorials', 2);\n\u002F\u002F Returns documents sorted by semantic similarity\n```\n\n## Function Calling\n\n### Step 4: Define Tools\n\n```typescript\ninterface Tool {\n  type: 'function';\n  function: {\n    name: string;\n    description: string;\n    parameters: {\n      type: 'object';\n      properties: Record\u003Cstring, { type: string; description: string }>;\n      required: string[];\n    };\n  };\n}\n\nconst tools: Tool[] = [\n  {\n    type: 'function',\n    function: {\n      name: 'get_weather',\n      description: 'Get the current weather for a location',\n      parameters: {\n        type: 'object',\n        properties: {\n          location: {\n            type: 'string',\n            description: 'City and country, e.g., \"London, UK\"',\n          },\n          unit: {\n            type: 'string',\n            description: 'Temperature unit: \"celsius\" or \"fahrenheit\"',\n          },\n        },\n        required: ['location'],\n      },\n    },\n  },\n  {\n    type: 'function',\n    function: {\n      name: 'search_web',\n      description: 'Search the web for information',\n      parameters: {\n        type: 'object',\n        properties: {\n          query: {\n            type: 'string',\n            description: 'The search query',\n          },\n        },\n        required: ['query'],\n      },\n    },\n  },\n];\n```\n\n### Step 5: Implement Function Calling Loop\n\n```typescript\nimport Mistral from '@mistralai\u002Fmistralai';\n\nconst client = new Mistral({\n  apiKey: process.env.MISTRAL_API_KEY,\n});\n\n\u002F\u002F Tool implementations\nconst toolFunctions: Record\u003Cstring, (args: any) => Promise\u003Cstring>> = {\n  get_weather: async ({ location, unit = 'celsius' }) => {\n    \u002F\u002F Simulated weather API call\n    return JSON.stringify({\n      location,\n      temperature: unit === 'celsius' ? 22 : 72,\n      unit,\n      condition: 'sunny',\n    });\n  },\n  search_web: async ({ query }) => {\n    \u002F\u002F Simulated web search\n    return JSON.stringify({\n      results: [\n        { title: `Result for: ${query}`, url: 'https:\u002F\u002Fexample.com' },\n      ],\n    });\n  },\n};\n\nasync function chatWithTools(userMessage: string): Promise\u003Cstring> {\n  const messages: any[] = [\n    { role: 'user', content: userMessage },\n  ];\n\n  while (true) {\n    const response = await client.chat.complete({\n      model: 'mistral-large-latest',\n      messages,\n      tools,\n      toolChoice: 'auto',\n    });\n\n    const choice = response.choices?.[0];\n    const assistantMessage = choice?.message;\n\n    if (!assistantMessage) {\n      throw new Error('No response from model');\n    }\n\n    \u002F\u002F Add assistant message to conversation\n    messages.push(assistantMessage);\n\n    \u002F\u002F Check if model wants to call tools\n    const toolCalls = assistantMessage.toolCalls;\n\n    if (!toolCalls || toolCalls.length === 0) {\n      \u002F\u002F No tool calls, return final response\n      return assistantMessage.content ?? '';\n    }\n\n    \u002F\u002F Execute tool calls\n    for (const toolCall of toolCalls) {\n      const functionName = toolCall.function.name;\n      const functionArgs = JSON.parse(toolCall.function.arguments);\n\n      console.log(`Calling tool: ${functionName}`, functionArgs);\n\n      const toolFn = toolFunctions[functionName];\n      if (!toolFn) {\n        throw new Error(`Unknown tool: ${functionName}`);\n      }\n\n      const result = await toolFn(functionArgs);\n\n      \u002F\u002F Add tool result to conversation\n      messages.push({\n        role: 'tool',\n        name: functionName,\n        content: result,\n        toolCallId: toolCall.id,\n      });\n    }\n  }\n}\n\n\u002F\u002F Usage\nconst answer = await chatWithTools('What is the weather in Paris?');\nconsole.log(answer);\n\u002F\u002F \"The current weather in Paris is sunny with a temperature of 22°C.\"\n```\n\n### Step 6: RAG (Retrieval-Augmented Generation)\n\n```typescript\nclass RAGChat {\n  private search: SemanticSearch;\n  private client: Mistral;\n\n  constructor() {\n    this.search = new SemanticSearch();\n    this.client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY });\n  }\n\n  async indexKnowledge(documents: { id: string; text: string }[]): Promise\u003Cvoid> {\n    await this.search.indexDocuments(documents);\n  }\n\n  async chat(userQuery: string): Promise\u003Cstring> {\n    \u002F\u002F Retrieve relevant documents\n    const relevantDocs = await this.search.search(userQuery, 3);\n\n    \u002F\u002F Build context from retrieved documents\n    const context = relevantDocs\n      .map(doc => `[Source ${doc.id}]: ${doc.text}`)\n      .join('\\n\\n');\n\n    \u002F\u002F Generate response with context\n    const response = await this.client.chat.complete({\n      model: 'mistral-small-latest',\n      messages: [\n        {\n          role: 'system',\n          content: `Answer questions based on the provided context. If the answer is not in the context, say so.\n\nContext:\n${context}`,\n        },\n        { role: 'user', content: userQuery },\n      ],\n    });\n\n    return response.choices?.[0]?.message?.content ?? '';\n  }\n}\n\n\u002F\u002F Usage\nconst rag = new RAGChat();\nawait rag.indexKnowledge([\n  { id: '1', text: 'Mistral AI was founded in 2023 in Paris, France.' },\n  { id: '2', text: 'The mistral-embed model produces 1024-dimensional vectors.' },\n]);\n\nconst answer = await rag.chat('When was Mistral AI founded?');\n```\n\n## Output\n- Text embeddings (1024 dimensions)\n- Semantic search implementation\n- Function calling with tool execution\n- RAG chat with retrieval\n\n## Error Handling\n| Aspect | Workflow A | Workflow B |\n|--------|------------|------------|\n| Use Case | Chat\u002FText Generation | Embeddings\u002FTools |\n| Models | All chat models | mistral-embed + large |\n| Complexity | Lower | Medium-Higher |\n| Latency | Depends on tokens | Batching helps |\n\n## Examples\n\n### Python Embeddings\n```python\nimport os\nfrom mistralai import Mistral\n\nclient = Mistral(api_key=os.environ.get(\"MISTRAL_API_KEY\"))\n\ndef get_embeddings(texts: list[str]) -> list[list[float]]:\n    response = client.embeddings.create(\n        model=\"mistral-embed\",\n        inputs=texts,\n    )\n    return [d.embedding for d in response.data]\n```\n\n### Python Function Calling\n```python\nimport json\nfrom mistralai import Mistral\n\nclient = Mistral(api_key=os.environ.get(\"MISTRAL_API_KEY\"))\n\ntools = [\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"get_weather\",\n            \"description\": \"Get weather for a location\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"location\": {\"type\": \"string\", \"description\": \"City name\"}\n                },\n                \"required\": [\"location\"]\n            }\n        }\n    }\n]\n\nresponse = client.chat.complete(\n    model=\"mistral-large-latest\",\n    messages=[{\"role\": \"user\", \"content\": \"What's the weather in Tokyo?\"}],\n    tools=tools,\n    tool_choice=\"auto\"\n)\n```\n\n## Resources\n- [Mistral AI Embeddings](https:\u002F\u002Fdocs.mistral.ai\u002Fcapabilities\u002Fembeddings\u002F)\n- [Mistral AI Function Calling](https:\u002F\u002Fdocs.mistral.ai\u002Fcapabilities\u002Ffunction_calling\u002F)\n- [Mistral AI Agents](https:\u002F\u002Fdocs.mistral.ai\u002Fcapabilities\u002Fagents\u002F)\n\n## Next Steps\nFor common errors, see `mistral-common-errors`.\n","# Mistral AI Core Workflow B: Embeddings & Function Calling\n\n## Overview\nSecondary workflows for Mistral AI: Text embeddings for semantic search and function calling for tool use.\n\n## Prerequisites\n- Completed `mistral-install-auth` setup\n- Familiarity with `mistral-core-workflow-a`\n- Valid API credentials configured\n\n## Embeddings\n\n### Step 1: Generate Text Embeddings\n\n```typescript\nimport Mistral from '@mistralai\u002Fmistralai';\n\nconst client = new Mistral({\n  apiKey: process.env.MISTRAL_API_KEY,\n});\n\nasync function getEmbedding(text: string): Promise\u003Cnumber[]> {\n  const response = await client.embeddings.create({\n    model: 'mistral-embed',\n    inputs: [text],\n  });\n\n  return response.data[0].embedding;\n}\n\n\u002F\u002F Usage\nconst embedding = await getEmbedding('Machine learning is fascinating.');\nconsole.log(`Embedding dimensions: ${embedding.length}`); \u002F\u002F 1024\n```\n\n### Step 2: Batch Embeddings\n\n```typescript\nasync function getBatchEmbeddings(texts: string[]): Promise\u003Cnumber[][]> {\n  const response = await client.embeddings.create({\n    model: 'mistral-embed',\n    inputs: texts,\n  });\n\n  return response.data.map(d => d.embedding);\n}\n\n\u002F\u002F Usage\nconst documents = [\n  'Python is a programming language.',\n  'JavaScript runs in browsers.',\n  'Rust is memory safe.',\n];\nconst embeddings = await getBatchEmbeddings(documents);\n```\n\n### Step 3: Semantic Search Implementation\n\n```typescript\nfunction cosineSimilarity(a: number[], b: number[]): number {\n  let dotProduct = 0;\n  let normA = 0;\n  let normB = 0;\n\n  for (let i = 0; i \u003C a.length; i++) {\n    dotProduct += a[i] * b[i];\n    normA += a[i] * a[i];\n    normB += b[i] * b[i];\n  }\n\n  return dotProduct \u002F (Math.sqrt(normA) * Math.sqrt(normB));\n}\n\ninterface Document {\n  id: string;\n  text: string;\n  embedding?: number[];\n}\n\nclass SemanticSearch {\n  private documents: Document[] = [];\n  private client: Mistral;\n\n  constructor() {\n    this.client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY });\n  }\n\n  async indexDocuments(docs: Omit\u003CDocument, 'embedding'>[]): Promise\u003Cvoid> {\n    const texts = docs.map(d => d.text);\n    const response = await this.client.embeddings.create({\n      model: 'mistral-embed',\n      inputs: texts,\n    });\n\n    this.documents = docs.map((doc, i) => ({\n      ...doc,\n      embedding: response.data[i].embedding,\n    }));\n  }\n\n  async search(query: string, topK = 5): Promise\u003CArray\u003CDocument & { score: number }>> {\n    const queryEmbedding = await this.getEmbedding(query);\n\n    const results = this.documents\n      .map(doc => ({\n        ...doc,\n        score: cosineSimilarity(queryEmbedding, doc.embedding!),\n      }))\n      .sort((a, b) => b.score - a.score)\n      .slice(0, topK);\n\n    return results;\n  }\n\n  private async getEmbedding(text: string): Promise\u003Cnumber[]> {\n    const response = await this.client.embeddings.create({\n      model: 'mistral-embed',\n      inputs: [text],\n    });\n    return response.data[0].embedding;\n  }\n}\n\n\u002F\u002F Usage\nconst search = new SemanticSearch();\nawait search.indexDocuments([\n  { id: '1', text: 'How to bake chocolate chip cookies' },\n  { id: '2', text: 'Machine learning fundamentals' },\n  { id: '3', text: 'Best practices for React development' },\n]);\n\nconst results = await search.search('AI tutorials', 2);\n\u002F\u002F Returns documents sorted by semantic similarity\n```\n\n## Function Calling\n\n### Step 4: Define Tools\n\n```typescript\ninterface Tool {\n  type: 'function';\n  function: {\n    name: string;\n    description: string;\n    parameters: {\n      type: 'object';\n      properties: Record\u003Cstring, { type: string; description: string }>;\n      required: string[];\n    };\n  };\n}\n\nconst tools: Tool[] = [\n  {\n    type: 'function',\n    function: {\n      name: 'get_weather',\n      description: 'Get the current weather for a location',\n      parameters: {\n        type: 'object',\n        properties: {\n          location: {\n            type: 'string',\n            description: 'City and country, e.g., \"London, UK\"',\n          },\n          unit: {\n            type: 'string',\n            description: 'Temperature unit: \"celsius\" or \"fahrenheit\"',\n          },\n        },\n        required: ['location'],\n      },\n    },\n  },\n  {\n    type: 'function',\n    function: {\n      name: 'search_web',\n      description: 'Search the web for information',\n      parameters: {\n        type: 'object',\n        properties: {\n          query: {\n            type: 'string',\n            description: 'The search query',\n          },\n        },\n        required: ['query'],\n      },\n    },\n  },\n];\n```\n\n### Step 5: Implement Function Calling Loop\n\n```typescript\nimport Mistral from '@mistralai\u002Fmistralai';\n\nconst client = new Mistral({\n  apiKey: process.env.MISTRAL_API_KEY,\n});\n\n\u002F\u002F Tool implementations\nconst toolFunctions: Record\u003Cstring, (args: any) => Promise\u003Cstring>> = {\n  get_weather: async ({ location, unit = 'celsius' }) => {\n    \u002F\u002F Simulated weather API call\n    return JSON.stringify({\n      location,\n      temperature: unit === 'celsius' ? 22 : 72,\n      unit,\n      condition: 'sunny',\n    });\n  },\n  search_web: async ({ query }) => {\n    \u002F\u002F Simulated web search\n    return JSON.stringify({\n      results: [\n        { title: `Result for: ${query}`, url: 'https:\u002F\u002Fexample.com' },\n      ],\n    });\n  },\n};\n\nasync function chatWithTools(userMessage: string): Promise\u003Cstring> {\n  const messages: any[] = [\n    { role: 'user', content: userMessage },\n  ];\n\n  while (true) {\n    const response = await client.chat.complete({\n      model: 'mistral-large-latest',\n      messages,\n      tools,\n      toolChoice: 'auto',\n    });\n\n    const choice = response.choices?.[0];\n    const assistantMessage = choice?.message;\n\n    if (!assistantMessage) {\n      throw new Error('No response from model');\n    }\n\n    \u002F\u002F Add assistant message to conversation\n    messages.push(assistantMessage);\n\n    \u002F\u002F Check if model wants to call tools\n    const toolCalls = assistantMessage.toolCalls;\n\n    if (!toolCalls || toolCalls.length === 0) {\n      \u002F\u002F No tool calls, return final response\n      return assistantMessage.content ?? '';\n    }\n\n    \u002F\u002F Execute tool calls\n    for (const toolCall of toolCalls) {\n      const functionName = toolCall.function.name;\n      const functionArgs = JSON.parse(toolCall.function.arguments);\n\n      console.log(`Calling tool: ${functionName}`, functionArgs);\n\n      const toolFn = toolFunctions[functionName];\n      if (!toolFn) {\n        throw new Error(`Unknown tool: ${functionName}`);\n      }\n\n      const result = await toolFn(functionArgs);\n\n      \u002F\u002F Add tool result to conversation\n      messages.push({\n        role: 'tool',\n        name: functionName,\n        content: result,\n        toolCallId: toolCall.id,\n      });\n    }\n  }\n}\n\n\u002F\u002F Usage\nconst answer = await chatWithTools('What is the weather in Paris?');\nconsole.log(answer);\n\u002F\u002F \"The current weather in Paris is sunny with a temperature of 22°C.\"\n```\n\n### Step 6: RAG (Retrieval-Augmented Generation)\n\n```typescript\nclass RAGChat {\n  private search: SemanticSearch;\n  private client: Mistral;\n\n  constructor() {\n    this.search = new SemanticSearch();\n    this.client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY });\n  }\n\n  async indexKnowledge(documents: { id: string; text: string }[]): Promise\u003Cvoid> {\n    await this.search.indexDocuments(documents);\n  }\n\n  async chat(userQuery: string): Promise\u003Cstring> {\n    \u002F\u002F Retrieve relevant documents\n    const relevantDocs = await this.search.search(userQuery, 3);\n\n    \u002F\u002F Build context from retrieved documents\n    const context = relevantDocs\n      .map(doc => `[Source ${doc.id}]: ${doc.text}`)\n      .join('\\n\\n');\n\n    \u002F\u002F Generate response with context\n    const response = await this.client.chat.complete({\n      model: 'mistral-small-latest',\n      messages: [\n        {\n          role: 'system',\n          content: `Answer questions based on the provided context. If the answer is not in the context, say so.\n\nContext:\n${context}`,\n        },\n        { role: 'user', content: userQuery },\n      ],\n    });\n\n    return response.choices?.[0]?.message?.content ?? '';\n  }\n}\n\n\u002F\u002F Usage\nconst rag = new RAGChat();\nawait rag.indexKnowledge([\n  { id: '1', text: 'Mistral AI was founded in 2023 in Paris, France.' },\n  { id: '2', text: 'The mistral-embed model produces 1024-dimensional vectors.' },\n]);\n\nconst answer = await rag.chat('When was Mistral AI founded?');\n```\n\n## Output\n- Text embeddings (1024 dimensions)\n- Semantic search implementation\n- Function calling with tool execution\n- RAG chat with retrieval\n\n## Error Handling\n| Aspect | Workflow A | Workflow B |\n|--------|------------|------------|\n| Use Case | Chat\u002FText Generation | Embeddings\u002FTools |\n| Models | All chat models | mistral-embed + large |\n| Complexity | Lower | Medium-Higher |\n| Latency | Depends on tokens | Batching helps |\n\n## Examples\n\n### Python Embeddings\n```python\nimport os\nfrom mistralai import Mistral\n\nclient = Mistral(api_key=os.environ.get(\"MISTRAL_API_KEY\"))\n\ndef get_embeddings(texts: list[str]) -> list[list[float]]:\n    response = client.embeddings.create(\n        model=\"mistral-embed\",\n        inputs=texts,\n    )\n    return [d.embedding for d in response.data]\n```\n\n### Python Function Calling\n```python\nimport json\nfrom mistralai import Mistral\n\nclient = Mistral(api_key=os.environ.get(\"MISTRAL_API_KEY\"))\n\ntools = [\n    {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"get_weather\",\n            \"description\": \"Get weather for a location\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"location\": {\"type\": \"string\", \"description\": \"City name\"}\n                },\n                \"required\": [\"location\"]\n            }\n        }\n    }\n]\n\nresponse = client.chat.complete(\n    model=\"mistral-large-latest\",\n    messages=[{\"role\": \"user\", \"content\": \"What's the weather in Tokyo?\"}],\n    tools=tools,\n    tool_choice=\"auto\"\n)\n```\n\n## Resources\n- [Mistral AI Embeddings](https:\u002F\u002Fdocs.mistral.ai\u002Fcapabilities\u002Fembeddings\u002F)\n- [Mistral AI Function Calling](https:\u002F\u002Fdocs.mistral.ai\u002Fcapabilities\u002Ffunction_calling\u002F)\n- [Mistral AI Agents](https:\u002F\u002Fdocs.mistral.ai\u002Fcapabilities\u002Fagents\u002F)\n\n## Next Steps\nFor common errors, see `mistral-common-errors`.\n",{"name":5,"author":53,"license":15,"version":54,"description":55,"allowed-tools":56},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Execute Mistral AI secondary workflows: Embeddings and Function Calling.\nUse when implementing semantic search, RAG applications,\nor tool-augmented LLM interactions.\nTrigger with phrases like \"mistral embeddings\", \"mistral function calling\",\n\"mistral tools\", \"mistral RAG\", \"mistral semantic search\".\n","Read, Write, Edit, Bash(npm:*), Grep","main","90b50ed0778745a80fd5bfb13b1843d45b9e82f7","tests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fmistral-pack\u002Fskills\u002Fmistral-core-workflow-b",233,"https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust","https:\u002F\u002Fgithub.com\u002FDicklesworthstone","https:\u002F\u002Fwww.jeffreyemanuel.com\u002F","Building in NY","2026-11-15 01:54:15",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add Dicklesworthstone\u002Fpi_agent_rust --skill mistral-core-workflow-b",{"tool":72,"command":73},"bunx","bunx skills add Dicklesworthstone\u002Fpi_agent_rust --skill mistral-core-workflow-b",{"tool":75,"command":76},"pnpm","pnpm dlx skills add Dicklesworthstone\u002Fpi_agent_rust --skill mistral-core-workflow-b","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fmistral-pack\u002Fskills\u002Fmistral-core-workflow-b\u002FSKILL.md",true,[],[81,118,141,167,190,212],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":92,"publishedAt":48},"01M6FEGPPK0ZTKCCM0R3E3KS33","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[89],{"categoryNo":90,"categoryName":91,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,42,109,35,110,111,112,113,114,115,116,117],"web artifacts builder","web","artifacts","artifacts builder","builder","frontend","css","components","react","component","routing","state management","state","shadcn","file","ui","Tailwind","html","single-file","simple","ui components","multi","for","jsx","suite",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":122,"sourceHtmlUrl":123,"categories":124,"keywords":129,"publishedAt":48},"01M6FEE9VTK1W4GY21AKREJXRG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[125,128],{"categoryNo":126,"categoryName":127,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":90,"categoryName":91,"taxonomyType":21,"taxonomyTypeDesc":22},[130,131,132,98,133,134,94,135,136,137,108,138,41,139,140,31,115],"testing","webapp testing","webapp","screenshots","playwright","debugging","toolkit","browser","logs","behavior","local",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":145,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":48},"01M6FE20F7ZTQBFWKF4MPJ2SBX","neuropixels-analysis","Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",[],[149,150,151,152,153,154,155,156,35,157,158,159,160,161,162,163,31,164,165,166,115,29],"analysis","neuropixels analysis","spike","metrics","data","open","quality","user","recordings","Neural","motion","visual","quality metrics","unit","sorting","curation","recording","load",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":171,"sourceHtmlUrl":172,"categories":173,"keywords":175,"publishedAt":48},"01M6FDP0PDK6F1GGX395C7625Z","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FSKILL.md",[174],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[176,177,47,178,179,180,181,39,182,183,184,185,186,187,31,115,188,29,189],"skill creator","creator","create","update","capabilities","knowledge","integrations","specialized","guide","new skill","existing skill","users","Existing","new",{"skillNo":191,"name":192,"nameZh":6,"description":193,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":194,"sourceHtmlUrl":195,"categories":196,"keywords":198,"publishedAt":48},"01M6FDM8Y7VK7NYG9SM7QPA3PW","notebooklm","Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FSKILL.md",[197],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[192,199,200,201,202,203,204,137,205,206,35,207,208,209,210,115,211],"google","browser automation","gemini","automation","auth","code","library","management","only","document","query","Citation","source",{"skillNo":213,"name":214,"nameZh":6,"description":215,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":216,"sourceHtmlUrl":217,"categories":218,"keywords":225,"publishedAt":48},"01M6FDHPXE10J3XGTCH5HBHS1M","slack-gif-creator","Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like \"make me a GIF of X doing Y for Slack.\"","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fenterprise-communication\u002Fslack-gif-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fenterprise-communication\u002Fslack-gif-creator\u002FSKILL.md",[219,222],{"categoryNo":220,"categoryName":221,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000005","邮件与沟通",{"categoryNo":223,"categoryName":224,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",[226,227,228,177,229,42,230,231,181,35,232,187,233,234,235,115,236,29],"slack gif creator","slack","gif","validation","constraints","Animation","me","make","Utilities","concepts","request"]