mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 00:16:23 +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.url = url + "v1/"
|
||||
self.url = url.rstrip('/') + "/v1/"
|
||||
self.temperature = temperature
|
||||
self.max_output = max_output
|
||||
self.openai = OpenAI(
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class Processor(LlmService):
|
|||
|
||||
try:
|
||||
|
||||
url = f"{self.base_url}/chat/completions"
|
||||
url = f"{self.base_url.rstrip('/')}/chat/completions"
|
||||
|
||||
async with self.session.post(
|
||||
url,
|
||||
|
|
@ -155,7 +155,7 @@ class Processor(LlmService):
|
|||
}
|
||||
|
||||
try:
|
||||
url = f"{self.base_url}/chat/completions"
|
||||
url = f"{self.base_url.rstrip('/')}/chat/completions"
|
||||
|
||||
async with self.session.post(
|
||||
url,
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class Processor(LlmService):
|
|||
|
||||
try:
|
||||
|
||||
url = f"{self.base_url}/completions"
|
||||
url = f"{self.base_url.rstrip('/')}/completions"
|
||||
|
||||
async with self.session.post(
|
||||
url,
|
||||
|
|
@ -138,7 +138,7 @@ class Processor(LlmService):
|
|||
}
|
||||
|
||||
try:
|
||||
url = f"{self.base_url}/completions"
|
||||
url = f"{self.base_url.rstrip('/')}/completions"
|
||||
|
||||
async with self.session.post(
|
||||
url,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue