Updated gateway
This commit is contained in:
@@ -2,7 +2,7 @@ server:
|
|||||||
port: 9082
|
port: 9082
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: farm-kilimo-ms-core
|
name: farm-kilimo-ms-assistant
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
host: localhost
|
host: localhost
|
||||||
@@ -23,16 +23,8 @@ logging:
|
|||||||
cors:
|
cors:
|
||||||
allowed-origins:
|
allowed-origins:
|
||||||
- http://localhost:9080
|
- http://localhost:9080
|
||||||
jwt:
|
- http://localhost:9081
|
||||||
secret: U7R7yI7oF5wI5Of5qTnS83uWhhRr9mY8ftkbvEtN/fc=
|
- http://localhost:9082
|
||||||
access:
|
|
||||||
expiration: 900000
|
|
||||||
refresh:
|
|
||||||
expiration: 604800000
|
|
||||||
verification:
|
|
||||||
expiration: 86400000
|
|
||||||
device:
|
|
||||||
expiration: 86400000
|
|
||||||
assistant:
|
assistant:
|
||||||
base: "You are Kilimo Assistant, an expert in farm and agriculture questions only."
|
base: "You are Kilimo Assistant, an expert in farm and agriculture questions only."
|
||||||
generateJson: "Return a JSON with fields: content (string), violate (bool if outside your expertise)."
|
generateJson: "Return a JSON with fields: content (string), violate (bool if outside your expertise)."
|
||||||
@@ -65,10 +57,3 @@ assistant:
|
|||||||
- IRRIGATION_SCHEDULING
|
- IRRIGATION_SCHEDULING
|
||||||
- MARKET_PRICES
|
- MARKET_PRICES
|
||||||
- FARM_EQUIPMENT_MAINTENANCE
|
- FARM_EQUIPMENT_MAINTENANCE
|
||||||
s3:
|
|
||||||
endpoint: https://api.storage.kilimo.farm
|
|
||||||
region: us-east-1
|
|
||||||
access-key: IUHVNy34p8vTuZFKLgqt
|
|
||||||
secret-key: EuFLjhJ6ivytNdIADwmx29PORCKYaBglUS1c7ZXp
|
|
||||||
bucket-name: kilimo
|
|
||||||
file-expiry: 1
|
|
||||||
@@ -2,7 +2,7 @@ server:
|
|||||||
port: 9082
|
port: 9082
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: farm-kilimo-ms-core
|
name: farm-kilimo-ms-assistant
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
host: localhost
|
host: localhost
|
||||||
@@ -23,16 +23,6 @@ logging:
|
|||||||
cors:
|
cors:
|
||||||
allowed-origins:
|
allowed-origins:
|
||||||
- https://zp1v56uxy8rdx5ypatb0ockcb9tr6a-oci3-m1d8v647--5173--96435430.local-credentialless.webcontainer-api.io/
|
- https://zp1v56uxy8rdx5ypatb0ockcb9tr6a-oci3-m1d8v647--5173--96435430.local-credentialless.webcontainer-api.io/
|
||||||
jwt:
|
|
||||||
secret: U7R7yI7oF5wI5Of5qTnS83uWhhRr9mY8ftkbvEtN/fc=
|
|
||||||
access:
|
|
||||||
expiration: 900000
|
|
||||||
refresh:
|
|
||||||
expiration: 604800000
|
|
||||||
verification:
|
|
||||||
expiration: 86400000
|
|
||||||
device:
|
|
||||||
expiration: 86400000
|
|
||||||
assistant:
|
assistant:
|
||||||
base: "You are Kilimo Assistant, an expert in farm and agriculture questions only."
|
base: "You are Kilimo Assistant, an expert in farm and agriculture questions only."
|
||||||
generateJson: "Return a JSON with fields: 'content'(string) and 'violate'(bool) if outside your expertise)."
|
generateJson: "Return a JSON with fields: 'content'(string) and 'violate'(bool) if outside your expertise)."
|
||||||
@@ -65,10 +55,3 @@ assistant:
|
|||||||
- IRRIGATION_SCHEDULING
|
- IRRIGATION_SCHEDULING
|
||||||
- MARKET_PRICES
|
- MARKET_PRICES
|
||||||
- FARM_EQUIPMENT_MAINTENANCE
|
- FARM_EQUIPMENT_MAINTENANCE
|
||||||
s3:
|
|
||||||
endpoint: http://localhost:9000
|
|
||||||
region: us-east-1
|
|
||||||
access-key: drwRB7Lb0CIlq3tySFXU
|
|
||||||
secret-key: ePchq5VQtlW7UsKX3fRzNE4wDTpmCJIHLFS1O8ov
|
|
||||||
bucket-name: kilimo
|
|
||||||
file-expiry: 3
|
|
||||||
@@ -5,13 +5,17 @@ spring:
|
|||||||
name: kilimo-gateway
|
name: kilimo-gateway
|
||||||
cloud:
|
cloud:
|
||||||
gateway:
|
gateway:
|
||||||
httpclient:
|
|
||||||
connect-timeout: 5000
|
|
||||||
response-timeout: 10s
|
|
||||||
routes:
|
routes:
|
||||||
- id: kilimo_service_route
|
- id: kilimo_core_service
|
||||||
uri: http://localhost:9081
|
uri: http://localhost:9081
|
||||||
predicates:
|
predicates:
|
||||||
- Path=/users/**
|
- Path=/core/**
|
||||||
filters:
|
filters:
|
||||||
- StripPrefix=1
|
- RewritePath=/core/(?<segment>.*), /$\{segment}
|
||||||
|
|
||||||
|
- id: kilimo_assistant_service
|
||||||
|
uri: http://localhost:9082
|
||||||
|
predicates:
|
||||||
|
- Path=/assistant/**
|
||||||
|
filters:
|
||||||
|
- RewritePath=/assistant/(?<segment>.*), /$\{segment}
|
||||||
@@ -5,13 +5,17 @@ spring:
|
|||||||
name: kilimo-gateway
|
name: kilimo-gateway
|
||||||
cloud:
|
cloud:
|
||||||
gateway:
|
gateway:
|
||||||
httpclient:
|
|
||||||
connect-timeout: 5000
|
|
||||||
response-timeout: 10s
|
|
||||||
routes:
|
routes:
|
||||||
- id: kilimo_service_route
|
- id: kilimo_core_service
|
||||||
uri: http://localhost:9081
|
uri: http://localhost:9081
|
||||||
predicates:
|
predicates:
|
||||||
- Path=/users/**
|
- Path=/core/**
|
||||||
filters:
|
filters:
|
||||||
- StripPrefix=1
|
- RewritePath=/core/(?<segment>.*), /$\{segment}
|
||||||
|
|
||||||
|
- id: kilimo_assistant_service
|
||||||
|
uri: http://localhost:9082
|
||||||
|
predicates:
|
||||||
|
- Path=/assistant/**
|
||||||
|
filters:
|
||||||
|
- RewritePath=/assistant/(?<segment>.*), /$\{segment}
|
||||||
@@ -23,6 +23,8 @@ logging:
|
|||||||
cors:
|
cors:
|
||||||
allowed-origins:
|
allowed-origins:
|
||||||
- http://localhost:9080
|
- http://localhost:9080
|
||||||
|
- http://localhost:9081
|
||||||
|
- http://localhost:9082
|
||||||
jwt:
|
jwt:
|
||||||
secret: U7R7yI7oF5wI5Of5qTnS83uWhhRr9mY8ftkbvEtN/fc=
|
secret: U7R7yI7oF5wI5Of5qTnS83uWhhRr9mY8ftkbvEtN/fc=
|
||||||
access:
|
access:
|
||||||
@@ -33,38 +35,6 @@ jwt:
|
|||||||
expiration: 86400000
|
expiration: 86400000
|
||||||
device:
|
device:
|
||||||
expiration: 86400000
|
expiration: 86400000
|
||||||
assistant:
|
|
||||||
base: "You are Kilimo Assistant, an expert in farm and agriculture questions only."
|
|
||||||
generateJson: "Return a JSON with fields: content (string), violate (bool if outside your expertise)."
|
|
||||||
generateTitle: "Add a short 'title' field in the JSON."
|
|
||||||
generateActions: "Add an 'actions' field in the JSON with relevant actions from the list below."
|
|
||||||
userMemory: "Consider these facts about user and generate any new(max 3) and add to 'userFacts' field in json"
|
|
||||||
chatMemory: "Consider these facts about this chat and generate any new(max 3) and add to 'chatFacts' field in json"
|
|
||||||
models:
|
|
||||||
- name: deepseek-gpt-4
|
|
||||||
url: https://api.deepseek.com/chat/completions
|
|
||||||
access:
|
|
||||||
key: Authorization
|
|
||||||
value: Bearer sk-52cdbf062bdf4e45aa39734e1bb2f813
|
|
||||||
- name: gemini-3-flash-preview
|
|
||||||
url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent
|
|
||||||
access:
|
|
||||||
key: x-goog-api-key
|
|
||||||
value: AIzaSyA3DXZUXLIYcMFWaWuZMmtzTU8RMIBg1Yk
|
|
||||||
actions:
|
|
||||||
- CREATE_FARM
|
|
||||||
- START_IRRIGATION
|
|
||||||
- HARVEST_CROPS
|
|
||||||
- PEST_CONTROL
|
|
||||||
- FERTILIZATION
|
|
||||||
- SOIL_TESTING
|
|
||||||
- WEATHER_FORECAST
|
|
||||||
- CROP_SELECTION
|
|
||||||
- DISEASE_DIAGNOSIS
|
|
||||||
- YIELD_PREDICTION
|
|
||||||
- IRRIGATION_SCHEDULING
|
|
||||||
- MARKET_PRICES
|
|
||||||
- FARM_EQUIPMENT_MAINTENANCE
|
|
||||||
s3:
|
s3:
|
||||||
endpoint: https://api.storage.kilimo.farm
|
endpoint: https://api.storage.kilimo.farm
|
||||||
region: us-east-1
|
region: us-east-1
|
||||||
|
|||||||
@@ -33,38 +33,6 @@ jwt:
|
|||||||
expiration: 86400000
|
expiration: 86400000
|
||||||
device:
|
device:
|
||||||
expiration: 86400000
|
expiration: 86400000
|
||||||
assistant:
|
|
||||||
base: "You are Kilimo Assistant, an expert in farm and agriculture questions only."
|
|
||||||
generateJson: "Return a JSON with fields: 'content'(string) and 'violate'(bool) if outside your expertise)."
|
|
||||||
generateTitle: "Add a short 'title' field in the JSON."
|
|
||||||
generateActions: "Add an 'actions'(string array) field in the JSON with relevant actions from below."
|
|
||||||
userMemory: "Consider these facts about user and generate any new(max 3) and add to 'userFacts'(string array) field in json"
|
|
||||||
chatMemory: "Consider these facts about this chat and generate any new(max 3) and add to 'chatFacts'(string array) field in json"
|
|
||||||
models:
|
|
||||||
- name: deepseek-gpt-4
|
|
||||||
url: https://api.deepseek.com/chat/completions
|
|
||||||
access:
|
|
||||||
key: Authorization
|
|
||||||
value: Bearer sk-52cdbf062bdf4e45aa39734e1bb2f813
|
|
||||||
- name: gemini-3-flash-preview
|
|
||||||
url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent
|
|
||||||
access:
|
|
||||||
key: x-goog-api-key
|
|
||||||
value: AIzaSyA3DXZUXLIYcMFWaWuZMmtzTU8RMIBg1Yk
|
|
||||||
actions:
|
|
||||||
- CREATE_FARM
|
|
||||||
- START_IRRIGATION
|
|
||||||
- HARVEST_CROPS
|
|
||||||
- PEST_CONTROL
|
|
||||||
- FERTILIZATION
|
|
||||||
- SOIL_TESTING
|
|
||||||
- WEATHER_FORECAST
|
|
||||||
- CROP_SELECTION
|
|
||||||
- DISEASE_DIAGNOSIS
|
|
||||||
- YIELD_PREDICTION
|
|
||||||
- IRRIGATION_SCHEDULING
|
|
||||||
- MARKET_PRICES
|
|
||||||
- FARM_EQUIPMENT_MAINTENANCE
|
|
||||||
s3:
|
s3:
|
||||||
endpoint: http://localhost:9000
|
endpoint: http://localhost:9000
|
||||||
region: us-east-1
|
region: us-east-1
|
||||||
|
|||||||
Reference in New Issue
Block a user