Skip to content

Commit ecc81b5

Browse files
committed
Fix docs broken links
1 parent ffd8222 commit ecc81b5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/clients/functions/openai-chat-functions.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Note that the OpenAI API does not call the function directly; instead, the model
99
To register your custom function you need to specify a function `name`, function `description` that helps the model to understand when to call the function, and the function call `signature` (as JSON schema) to let the model know what arguments the function expects.
1010
Then you can implement a function that takes the function call arguments from the model interacts with the external, 3rd party, services and returns the result back to the model.
1111

12-
Spring AI offers a generic link:../../../spring-ai-core/src/main/java/org/springframework/ai/model/ToolFunctionCallback.java[ToolFunctionCallback.java] interface and the companion link:../../../spring-ai-core/src/main/java/org/springframework/ai/model/AbstractToolFunctionCallback.java[AbstractToolFunctionCallback.java] utility class to simplify the implementation and registration of Java callback functions.
12+
Spring AI offers a generic link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/model/ToolFunctionCallback.java[ToolFunctionCallback.java] interface and the companion link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/model/AbstractToolFunctionCallback.java[AbstractToolFunctionCallback.java] utility class to simplify the implementation and registration of Java callback functions.
1313

1414
== Quick Start
1515

@@ -18,7 +18,7 @@ For example lets register a custom function that takes a location and returns th
1818
Question such as "What’s the weather like in Boston?" should trigger the model to call the function providing the location as an argument.
1919
The function uses some weather service API and returns the weather response back to the model to complete the conversation.
2020

21-
Let the link:../../../models/spring-ai-openai/src/test/java/org/springframework/ai/openai/chat/api/tool/MockWeatherService.java[MockWeatherService.java] represent the 3-rd party weather service API:
21+
Let the `MockWeatherService.java` represent the 3-rd party weather service API:
2222

2323
[source,java]
2424
----
@@ -34,7 +34,7 @@ public class MockWeatherService implements Function<Request, Response> {
3434
}
3535
----
3636

37-
Then extend link:../../../spring-ai-core/src/main/java/org/springframework/ai/model/AbstractToolFunctionCallback.java[AbstractToolFunctionCallback] to implement our weather function like this:
37+
Then extend link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-core/src/main/java/org/springframework/ai/model/AbstractToolFunctionCallback.java[AbstractToolFunctionCallback] to implement our weather function like this:
3838

3939
[source,java]
4040
----
@@ -62,7 +62,7 @@ The Spring AI auto-generates the JSON Scheme for the `MockWeatherService.Request
6262

6363
=== Registering Functions as Beans
6464

65-
If you enable the link:../openai-chat.html#_openaichatclient_auto_configuration[OpenAiChatClient Auto-Configuration], the easiest way to register a function is to created it as a bean in the Spring context:
65+
If you enable the link:../openai-chat.html#_auto_configuration[OpenAiChatClient Auto-Configuration], the easiest way to register a function is to created it as a bean in the Spring context:
6666

6767
[source,java,linenums]
6868
----
@@ -104,7 +104,7 @@ Here is the current weather for the requested cities:
104104
- Paris, France: 15.0°C
105105
----
106106

107-
The [ToolCallWithPromptFunctionRegistrationIT.java] integration test provides a complete example of how to register a function with the `OpenAiChatClient` using the auto-configuration.
107+
The link:https://github.com/spring-projects/spring-ai/blob/main/spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/openai/tool/ToolCallWithBeanFunctionRegistrationIT.java[ToolCallWithBeanFunctionRegistrationIT.java] integration test provides a complete example of how to register a function with the `OpenAiChatClient` using the auto-configuration.
108108

109109
=== Register/Call Functions with Prompt Options
110110

@@ -132,7 +132,7 @@ NOTE: The in-prompt registered functions are enabled by default for the duration
132132

133133
This approach allows to dynamically chose different functions to be called based on the user input.
134134

135-
The [ToolCallWithPromptFunctionRegistrationIT.java] integration test provides a complete example of how to register a function with the `OpenAiChatClient` and use it in a prompt request.
135+
The https://github.com/spring-projects/spring-ai/blob/main/spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/openai/tool/ToolCallWithPromptFunctionRegistrationIT.java[ToolCallWithPromptFunctionRegistrationIT.java] integration test provides a complete example of how to register a function with the `OpenAiChatClient` and use it in a prompt request.
136136

137137
=== Function Calling Flow
138138

0 commit comments

Comments
 (0)