mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-26 08:56:21 +02:00
Normalise URLs so that / suffix is optional (#617)
This commit is contained in:
parent
83ea15dae7
commit
58c00149a7
3 changed files with 5 additions and 5 deletions
|
|
@ -40,7 +40,7 @@ class Processor(LlmService):
|
||||||
)
|
)
|
||||||
|
|
||||||
self.default_model = model
|
self.default_model = model
|
||||||
self.url = url + "v1/"
|
self.url = url.rstrip('/') + "/v1/"
|
||||||
self.temperature = temperature
|
self.temperature = temperature
|
||||||
self.max_output = max_output
|
self.max_output = max_output
|
||||||
self.openai = OpenAI(
|
self.openai = OpenAI(
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ class Processor(LlmService):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
url = f"{self.base_url}/chat/completions"
|
url = f"{self.base_url.rstrip('/')}/chat/completions"
|
||||||
|
|
||||||
async with self.session.post(
|
async with self.session.post(
|
||||||
url,
|
url,
|
||||||
|
|
@ -155,7 +155,7 @@ class Processor(LlmService):
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
url = f"{self.base_url}/chat/completions"
|
url = f"{self.base_url.rstrip('/')}/chat/completions"
|
||||||
|
|
||||||
async with self.session.post(
|
async with self.session.post(
|
||||||
url,
|
url,
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ class Processor(LlmService):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
url = f"{self.base_url}/completions"
|
url = f"{self.base_url.rstrip('/')}/completions"
|
||||||
|
|
||||||
async with self.session.post(
|
async with self.session.post(
|
||||||
url,
|
url,
|
||||||
|
|
@ -138,7 +138,7 @@ class Processor(LlmService):
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
url = f"{self.base_url}/completions"
|
url = f"{self.base_url.rstrip('/')}/completions"
|
||||||
|
|
||||||
async with self.session.post(
|
async with self.session.post(
|
||||||
url,
|
url,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue