Oscar Morrison
Oscar Morrison
+1 @tpope this looks great.
@MikeShi42 is a sdk support coming for php (ideally a laravel package). We would be interested in something like this and moving away from new relic/sentry
``` const prompt = await langfuse.getPrompt(PROMPT.ANSWER, undefined, { type: 'chat' }); ``` @marcklingen this makes no difference. I still have the type error (btw i was getting the correct chat...
```TSError: ⨯ Unable to compile TypeScript: src/routes/v4/answer.ts:119:9 - error TS2769: No overload matches this call. Overload 1 of 3, '(body: ChatCompletionCreateParamsNonStreaming, options?: RequestOptions | undefined): APIPromise', gave the following error....
I believe the issue is: https://js.reference.langfuse.com/types/langfuse_core.ChatMessage.html it should be returning: `OpenAI.Chat.ChatCompletionMessageParam[]`
Casting fixed the issue: ``` const messages: ChatCompletionMessageParam[] = prompt.compile({ team_name: team_name, team_usecase: team_usecase, user_name: user_name, user_role: user_role, query: query, pagesString: pagesString, documentsString: documentsString, questionsString: questionsString, }) as ChatCompletionMessageParam[]; ```