Skip to content

Commit

Permalink
feat: ollama liquibase
Browse files Browse the repository at this point in the history
  • Loading branch information
Angular2Guy committed Dec 15, 2023
1 parent 5ae864d commit 6dd8292
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
2 changes: 2 additions & 0 deletions backend/src/main/resources/application-ollama.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
spring.ai.ollama.base-url=${OLLAMA-BASE-URL:http://localhost:11434}
spring.liquibase.change-log=classpath:/dbchangelog/db.changelog-master-ollama.xml
1 change: 0 additions & 1 deletion backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ server.servlet.session.timeout=30s

spring.jackson.parser.allow-unquoted-control-chars=true
spring.ai.openai.api-key=${OPENAI-API-KEY:23418pajkfdsadlöa}
spring.ai.ollama.base-url=${OLLAMA-BASE-URL:http://localhost:11434}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2019 Sven Loesekann Licensed under the Apache License, Version
2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the License. -->
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd">
<changeSet id="8" author="angular2guy">
<modifyDataType tableName="vector_store" columnName="embedding" newDataType="vector(384)"/>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2019 Sven Loesekann
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd">

<include file="changes/db.changelog-1.xml" relativeToChangelogFile="true"/>
<include file="changes/db.changelog-1-ollama.xml" relativeToChangelogFile="true"/>

<include file="db.changelog-loaddata.xml" relativeToChangelogFile="true"/>

</databaseChangeLog>

0 comments on commit 6dd8292

Please sign in to comment.