Commit Graph

776 Commits

Author SHA1 Message Date
cocomongg
f89aa3bcdb Fix typo: Change 'context' to 'content 2024-06-13 16:12:56 +02:00
Nicholas Zhan
02f4413273 docs(onnx): add additional info for configuration properties and note for ONNX transformer. 2024-06-13 16:12:40 +02:00
Christian Tzolov
85d2fa525e Fix the Gemini parallel function calling behaviour.
Enable handling multiple function calls at once.
  Change the Gemini model names from preview to gemini-1.5-pro-001 and gemini-1.5-flash-001.
  Simplify the Gemini function calling ITs. drop the multi-turn instructions.
2024-06-13 15:37:53 +02:00
Christian Tzolov
dbccfda7c5 Update Google VertexAI Gemini to 26.41.0
- update the Gemini function calling ITs to include a system message with dedicated calling instructions.
 - fix a type with few Gemini ChatModel enum names.
 - re-enable all Gemini ITs.
2024-06-13 12:43:23 +02:00
Christian Tzolov
2306db4a30 Improve the ai concepts documentation 2024-06-07 21:06:32 +02:00
Christian Tzolov
a4412b5d3a Various fixes and stability improvements
- Fix a bug in Azure streaming response. Ensure that the merge functionality resolves the right
   object constructors
 - drop the @ConditionalOnMissingBean for the ChatClientAutoConfiguration#chatClientBuilder .
   If multiple chat model starters are added to the POM this will fail as the ChatClient.Builder
    auto-config can handle only one chat model. Then the spring.ai.chat.client.enabled=false must be set.
 - Add missing AutoConfiguration imports for SpringAiRetryAutoConfiguration.class, RestClientAutoConfiguration.class,
   and WebClientAutoConfiguration.class to the AnthropicAutoConfiguration, MistralAiAutoConfiguration,
   OllamaAutoConfiguration,VertexAiPalm2AutoConfiguration.
 - change the OpenAi and Azure OpenAi default chat models to  gpt-4o
 - clean and improve the stability of various ITs
2024-06-07 14:26:17 +02:00
Christian Tzolov
64378dfcdd Fix the ChatClient call().content() output 2024-06-05 15:25:41 +02:00
Christian Tzolov
73b445b43b Minor doc improvements 2024-06-04 15:27:21 +02:00
Christian Tzolov
9bb2618436 Fix javadoc issues 2024-06-04 14:54:55 +02:00
Christian Tzolov
d6a0dffd3e Add ChatClient support for returning ResponseEntity<ChatResponse, T>
ChatClient already provides the .chatResponse() method to return the entire ChatResponse instance.
 It also provides a set of overloaded .entity(Type) methods to provide Type-converted responses.
 The new .responseEntity(Type) method returns a ResponseEntity<ChatResponse, T> instance, encapsulating
 both the ChatResponse and the requested Type-converted response entity.

 This change allows for more flexibility when handling different response types and facilitates
 easier integration with other components that expect ResponseEntity instances.
2024-06-04 14:36:21 +02:00
Christian Tzolov
6ad36b7653 ChatClient/DefaultChatClient refactoring
Now the ChatClient contains only the Spec interfaces while
   all implementations are moved to the DefaultChatClient
   and the DefaultChatModelBuilder classes.
2024-06-04 14:07:19 +02:00
Christian Tzolov
b9844f9bf8 Improve AI concepts doc 2024-06-04 07:09:29 +02:00
Christian Tzolov
7cf3525f1a Few doc aligments with the new ChatClient API 2024-06-04 06:28:56 +02:00
Christian Tzolov
1758d561f6 docs improvments 2024-06-03 22:18:24 +02:00
Christian Tzolov
7c86fc7c89 Minor doc improvements 2024-06-03 22:10:34 +02:00
Christian Tzolov
19f3930737 Add doc concepts diagrams 2024-06-03 21:53:13 +02:00
yinpeng
20c6a1adcf fix: typo 2024-06-03 15:00:19 +02:00
blackbean99
77afc6028f update embeddings-api.jpg 2024-06-03 14:59:38 +02:00
Cameron Kirk
d44a9ad17b Update chatclient.adoc 2024-06-03 14:49:41 +02:00
Cameron Kirk
b0a02778b9 Update chatclient.adoc 2024-06-03 14:49:41 +02:00
Cameron Kirk
7f8822fdea Fix typo chatclient.adoc 2024-06-03 14:49:41 +02:00
Christian Tzolov
f4c46770ee Widen the PromptSpec param value type from String to Object 2024-06-03 11:39:31 +02:00
Christian Tzolov
fa53e2afb3 Update Vertx AI PaLM2 deprecation information. 2024-05-31 16:45:10 +02:00
Craig Walls
76e7e0bd93 Overload QuestionAnswerAdvisor to use SearchRequest.defaults() 2024-05-30 13:12:42 +02:00
Philipp Gerhard
9286dfb4bd Extend format to improve generate JSON
- Add an additional instruction to the format for the model not to include markdown syntax for JSON quotes.
- Extend the conversion to strip markdown quotes in case the model included them in the response
2024-05-29 15:10:36 +02:00
Mark Pollack
ac91302eed Next development version 2024-05-28 13:53:04 -04:00
Mark Pollack
0670575f3e Release version 1.0.0-M1 2024-05-28 13:49:11 -04:00
Mark Pollack
db1f3ea5d2 doc fixes 2024-05-27 23:35:44 -04:00
Mark Pollack
2b2cacce8c Add documentation for ChatClient and Evaluation 2024-05-27 23:04:12 -04:00
Benoit Moussaud
a30cc9d84d Add the support of Azure OpenAI image generation
* Add docs
2024-05-27 16:26:24 -04:00
Mark Pollack
574138a26a Remove chat.service package and related classes
* This functionality is now provided using the advisors feature in ChatClient
2024-05-27 15:36:30 -04:00
Christian Tzolov
a64dd06c48 Add payment transaction status Function Calling ITs - OpenAI and Vertex AI Gemeini 2024-05-27 18:11:44 +02:00
Christian Tzolov
5226d0b9b3 Enable ZhiPu AI ITs only on ZHIPU_AI_API_KEY env present 2024-05-27 08:40:45 +02:00
Christian Tzolov
22a511a6d7 Fix the ChatClient.Builder.defaultAdvisors() to take var args 2024-05-27 07:59:17 +02:00
Christian Tzolov
42095f011a Remove dots from the prompt template placeholder names
The ST library doesn't permit dots in the placeholder names.
2024-05-27 07:44:56 +02:00
Eddú Meléndez
9c1b1b84ee Add Docker Compose Service Connection
* For ChromaDB, Ollama, Qdrant, Redis, Weaviate
* Add docs
2024-05-26 23:28:44 -04:00
GR
23e448cf2a fix: ZhiPu embedding client individual calls to embed document collection
fixes #771
2024-05-26 23:24:36 -04:00
Christian Tzolov
c4784a070f Add ChatClient plugable advisors support
- Add RequestResponseAdvisor interface with adviseReqeust and adviseResponse methods.
    The adviseRequest method takes and returns AdvisedRequest.
    The adviseResponse method takes and returns ChatRequest.
  - Add ChatClient#ChatClientRequets advisor(...) methods to register advisros.
    ChatClient call the registered advisors in order before sealing the ChatClientRequest into a Prompt and call the model
    and after the model response.
  - Implement PromptChatMemoryAdvisor that uses the ChatMemory and the systemem prompt.
  - Implement MessageChatMemoryAdvisor that usees the ChatMemory and the prompt messages.
  - Implement VectorStoreChatMemoryAdvisor that uses VecrStore for long term message history.
  - Add tests.
  - Add shared context to the RequestResponseAdvisor's flow, Context is shared between the request and the  response
  - Add advisor parameters that are passed through the context
2024-05-26 23:23:52 -04:00
Christian Tzolov
178a607cf6 Fix an issue related to the Azure OpenAI streamig response
This issue in the Flux streaming logic was causing chunks
  to be aggreagated in a single response.

  Re-enable the AzureOpenAiAutoConfigurationIT
2024-05-27 01:02:35 +02:00
Mark Pollack
dc656ce3bc Update available OpenAI GPT 4 family of models in enum
* Use GPT 4 Turbo in OpenAiPromptTransformingChatServiceIT
* Accept multiple bike names as acceptable answers in assertion
* Update docs
2024-05-26 18:31:39 -04:00
Mark Pollack
a60035eeb6 Update to Spring Boot 3.3
* Tests have been updated to use the "gpt-4-turbo" model instead of the "gpt-4-turbo-preview".
* String comparisons of temperature have been adjusted to match the format changes from model reponses
2024-05-26 16:24:57 -04:00
Mark Pollack
c22b2f05dd Add support for use of AZURE_OPENAI_DEPLOYMENT_NAME in IT tests
* remove from README.md info of changed default for initialize-schema
2024-05-26 14:28:51 -04:00
Christian Tzolov
7c2c0cfc18 Improve the MockWeatherService to reduce erratic IT behaviour 2024-05-26 20:25:26 +02:00
Christian Tzolov
a49974d90f Various, minor Amazon Bedrock ITs improvements 2024-05-26 19:40:00 +02:00
Christian Tzolov
a4e3a7b8de Streamline the OllamaEmbeddingModelIT 2024-05-26 18:32:25 +02:00
Christian Tzolov
79e2dab29a Disable ITs related to the ChatService's ChatMemory implementations
Disable ITs due to deprecation of all ChatService PromptTransformer ChatMemory implementations.
2024-05-26 17:27:59 +02:00
Christian Tzolov
99fbf013d3 Temp revert CommonVectorStoreProperties.initializeSchema to true by default 2024-05-26 17:17:55 +02:00
Josh Long
2d43e40024 Add property to initialize schema for vector stores
* Default is fale
* Update docs
2024-05-26 00:31:19 -04:00
Mark Pollack
b872c894c3 Update OpenAIAutoConfiguration to import dependent auto configurations
* Fixes breaking change introduced in commit 377b5ff
2024-05-24 13:17:04 -04:00
JoeHitHard
dea7ab67c3 #690 choices can be null look at OpenAiApi.java:606
Signed-off-by: JoeHitHard <josephmeghanath@gmail.com>
2024-05-24 11:51:18 -04:00