MCPcopy Index your code
hub / github.com/simstudioai/sim / chat

Function chat

apps/sim/providers/litellm/index.test.ts:80–90  ·  view source on GitHub ↗
({ content = null, toolCalls, usage }: ChatOptions = {})

Source from the content-addressed store, hash-verified

78}
79
80function chat({ content = null, toolCalls, usage }: ChatOptions = {}) {
81 return {
82 choices: [
83 {
84 message: { content, tool_calls: toolCalls },
85 finish_reason: toolCalls ? 'tool_calls' : 'stop',
86 },
87 ],
88 usage: usage ?? { prompt_tokens: 5, completion_tokens: 3, total_tokens: 8 },
89 }
90}
91
92function tool(name: string) {
93 return { id: name, name, description: 'd', parameters: {} }

Callers 1

index.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected