deepseek icon indicating copy to clipboard operation
deepseek copied to clipboard

Is there any example of function call?

Open jursonmo opened this issue 8 months ago • 4 comments

jursonmo avatar Apr 14 '25 02:04 jursonmo

Hi @jursonmo we support function call for chat completion but we don't have example added so far. Let us give a try soon. All examples can be found here https://github.com/go-deepseek/deepseek/tree/main/examples

nurali-techie avatar Apr 14 '25 18:04 nurali-techie

hi @nurali-techie , I attempted to write a function call example, but I encountered an issue: I don’t know how to append LLM‘s response message to the request message . i just try to do something like this: https://github.com/openai/openai-go/blob/e1d5123160f195fbb74e00548e8d7896db9caafc/examples/chat-completion-tool-calling/main.go#L61

jursonmo avatar Apr 17 '25 03:04 jursonmo

Hi @jursonmo Thanks for the example link.

I am following the example from deepseek https://api-docs.deepseek.com/guides/function_calling#sample-code and found that there are some gaps in making function calls with this DeepSeek client.

Let me keep this issue open until a function call is supported. Feel free to contribute and raise a PR to fix this issue.

nurali-techie avatar Apr 18 '25 13:04 nurali-techie

need too on stream mode

mofadeyunduo avatar Jul 02 '25 07:07 mofadeyunduo